TITLE D. W. Jones 22C:018-A HW3 USE "/group/22c018/hawk.macs" . = #1000 S start start: LIL R1,data LOADS R2,R1 LOAD R3,R1,4 ADDS R3,R3,2 ADDS R3,0,1 ADD R4,R3,R2 STORES R4,R1 . = RAM data: W 50 ; the variable a W 50 ; the variable b END
x := 0;
y := 1;
repeat
z := x + y;
y := x;
x := z;
until z > 100
(In Pascal, := means assignment, = means comparison for equality; beyond
this, the above code uses nothing that shouldn't be intuitive.)
You need not run this program, but you may; 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!