Assume that src1 DCD 0xFF00FF00 and src2 DCD 0x00AA00AA are located
consecutively in the READONLY area of memory. Also, assume that src1 starts at
address 0x00000008 and SP= 0x20000400. For each of the following instructions,
calculate the values of registers involved. Draw the status of the STACK area of
memory for those instructions where we use it.
LDR R0 , = src 1
ADD R0 , #1
LDR R1 , [R0]
PUSH {R1}
ADD R0 , #4
LDRSH R2 , [R0]
PUSH {R2}
MOV R3, SP
ADD R3 , #3
LDR R4 , [R3]
SUB R4, #0x004C004C
STR R4 , [R3]
POP {R2}
POP {R1}
Answers
Answered by
0
consecutively in the READONLY area of memory. Also, assume that src1 starts at
address 0x00000008 and SP= 0x20000400. For each of the following instructions,
calculate the values of registers involved. Draw the status of the STACK area of
memory for those instructions where we use it.
LDR R0 , = src 1
ADD R0 , #1
LDR R1 , [R0]
PUSH {R1}
ADD R0 , #4
LDRSH R2 , [R0]
PUSH {R2}
MOV R3, SP
ADD R3 , #3
LDR R4 , [R3]
SUB R4, #0x004C004C
STR R4 , [R3]
POP {R2}
POP {R1}
Similar questions