Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

assume the following register and memory contents in an arm computer; register R

ID: 3634508 • Letter: A

Question

assume the following register and memory contents in an arm computer;
register R0 contains 1000
register R1 contains 2000
register R2 contains 1016
register R6 contains 20
register R7 contains 30
the numbers 1,2,3,4,5 and 6 are stored in successive word locations starting at memory address 1000. what is the effect of the executing each of the following three short intstruciton blocks starting each time from the given initial values
a) LDR R8,[R0] b) STR R6,[R1,#-4]! C) LDMIA R2!,{R4,R5}
LDR R9, [R0,#4] STR R7,[R1,#-4]! ADD R4,R4,R5
ADD R10,R8,R9 LDR R8,[R1],#4



Explanation / Answer

(a) LDR R8,[R0] R0= 1000 R8 [R1,#-4] ------> [2000,#-4] -------> [2000-4] 20 ------> [1996] 20 WILL BE STORED AT ADDRESS1996 (C) LDMIA R2!,{R4,R5} -----LOAD DATA STARTING FROM R2 LOCATION INTO R4 & R5 -----CONTENT OF R2=CONTENT OF 2016,THAT IS 17 -----SO 17 WILL BE LOADED TO R4 AND NEXT 18 WILL BE LOADED TO R5 LDR R9,[R0,#4] --- WILL LOAD R9 WITH DATA AT[R0,#4] ---- R9