%%%off % Copyright: This file is part of the MMIX Supplement package (c) Martin Ruckert 2014 % File: 5.3.1/ex28.mms % Author: M. Ruckert % Title: Exercise 28, short version % Following the text page 183 to 184 % using the sequence: load, test and branch, store K IS $0 Parameter, Address of five Octabytes a IS $1 b IS $2 c IS $3 d IS $4 e IS $5 t IS $6 x IS $7 &^{x+ (temporary variable)} %%%on :Sort LDB a,K,0 1& LDB b,K,1 1& LDB c,K,2 1& LDB d,K,3 1& LDB e,K,4 1& %%% CMP t,a,b 1& CSP x,t,a 1& $a \leftrightarrow b $. CSP a,t,b 1& CSP b,t,x 1& %%% CMP t,c,d 1& Here $aa$, $b\leftrightarrow e$. 0H STB d,K,4 4/5& Here $a