LC-3 STR with R1 as offset
问题 I'm having trouble getting this subroutine I'm writing to work. Basically, I am trying to have a subroutine where I would set R0 to a value in some array (R3) with an offset of R1 . R0_ORIGINAL .FILL 0 R1_ORIGINAL .FILL 0 R2_ORIGINAL .FILL 0 R3_ORIGINAL .FILL 0 LOAD ST R0, R0_ORIGINAL ST R1, R1_ORIGINAL ST R2, R2_ORIGINAL ST R3, R3_ORIGINAL AND R0, R0, #0 ADD R0, R0, R2 BRz SKIP AND R3, R3, #0 LD R3, FIFTY ADD R1, R1, R3 SKIP AND R3, R3, #0 LEA R3, CIPHER_ARRAY STR R0, R3, R1 LD R0, R0