LIS R1,#FF LIL R2,#FEDCBA ORIS R2,#98 ADD R3,R2,R1
TITLE D. W. Jones 22C:018-A HW3 USE "/group/22c018/hawk.macs" S start start: LIS R1,#FF LIL R2,#FEDCBA ORIS R2,#98 ADD R3,R2,R1 LOAD R4,pointr STORES R3,R4 ; store in data LIW R5,#FF000100 LIW R6,"OLEH" STORES R6,R5 H 0 ALIGN 4 COMMON data,4 pointr: W data END
z := 0;
y := 1;
repeat
x := z + y;
y := z;
z := x;
until x > 50
(In Pascal, := means assignment, = means comparison for equality; beyond
those details, everything else about the above code should be intuitive.)
You need not run this program! You may run it; single stepping through
the loop until it terminates can be instructive, and this problem counts
twice as much as the previous problems on this assignment!