; Print a message string ; .ORIG x4000 ; Start the program at x4000 LEA R2, MSG ; Pt R2 -> start of message string LOOP1 LDR R0, R2, #0 ; R0 = next char of string BRZ DONE ; Loop until end of string TRAP x21 ; Print current char of string ADD R2, R2, #1 ; Pt R2 to next char of string BRNZP LOOP1 ; Continue loop DONE TRAP x25 ; Halt execution MSG .FILL x0048 ; "H" .FILL x0069 ; "i" .FILL x0000 ; end of string .END ; End of program