This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: SUB R1,R1, #1 CMP R1, #0 BNE LOOP LDR R1,=TOT STR R0, [R1] DONE: B DONE .data .align SIZE: .word 3 VEC: .word 3, -1, 2 TOT: .skip 4 .end 3. Assume the following register 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 executing each of the following two short instruction blocks starting each time from the given initial values? (A) LDR R8, [R0] LDR R9, [R0,#4] ADD R10,R8,R9 (B) STR R6,[R1,#-4]! STR R7,[R1,#-4]! LDR R8,[R1],#4 LDR R9,[R1],#4 SUB R10,R8,R9...
View Full Document
- Spring '10
- SEPTA Regional Rail, Central processing unit, 32-bit, =SIZE LDR R1, LOOP LDR R1