After the following LC-3 code executes what are the ending contents of the regis
ID: 3797245 • Letter: A
Question
After the following LC-3 code executes what are the ending contents of the registers and memory? Assume some registers/memories have starting values as indicated. If blank, the content is unknown. Remember that both registers and memory locations are 16-bits wide. The memory portion starts at address 0x3200. R0 holds the value x1234 at the start.
LEA R1, label0
LDR R2, R1, #0
STR R0, R1, #4
LEA R6, label2
ADD R5, R0, R1
LEA R0, label1
AND R7, R2, R5
NOT R3, R0
STR R7, R6, #-2
STR R2, R1, #1
Label Contents
label0 0xDEAD
label1
label2
Explanation / Answer
R0 0x3204
R1 0x3200
R2 0xDEAD
R3 0xCDFB
R4
R5 0x4434
R6 0x3207
R7 0x4424
Label1 0x1234
0x4424