; convert a null-terminated character string to uppter case .ORIG x3000 LEA R3, LOWERA ; load address of Lower “q” in to R3 LDW R3, R3, #0 ; load “q” into R3 ; get read start address LEA R0, RSTART ; load address of instruction rstart LDW R0, R0, #0 ; load x4000 STB R3, R0, #0 ; write “q” to mem[x4000] ; get write start address LEA R1, WSTART ; load address of instruction wstart LDW R1, R1, #0 ; load x4002 ; converstion start LOOP LDB R2, R0, #0 ; load character BRz EXIT ; if character is null, exit ADD R2, R2, #-16 ADD R2, R2, #-16 ; r2 - 32 WRITE STB R2, R1, #0 ; write r2 to address r1 ADD R0, R0, #1 ; move to next read address ADD R1, R1, #1 ; move to next write address BR LOOP EXIT STB R2, R1, #0 ; store null-terminated character HALT RSTART .FILL x4000 WSTART .FILL x4002 LOWERA .FILL x0071 ;This is “q” in ASCii, hexadecimal .END