TITLE "hello.a -- a hello world program that iterates" USE "hawk.h" USE "stdio.h" ARSIZE = 4 INT MAIN S MAIN MAIN: STORES R1,R2 ADDI R2,R2,ARSIZE ; main() { ; ---- application code start LIS R8,0 ; i = 0 LOOP: ; do { LIL R3,HELLO LIL R1,PUTS JSRS R1,R1 ; puts( "hello world" ) ADDSI R8,1 ; i = i + 1 CMPI R8,6 BLT LOOP ; } while (i < 6) ; ---- application code end ADDI R2,R2,-ARSIZE LOADS R1,R2 JUMPS R1 ; return ; } HELLO: ASCII "hello world",0 END