If X1 has 1000, X9 has 77, and memory locations 1000, 1008, and
1016 have 100, 200, 300 respectively, what do X2 have after the
following instructions?
LDUR X2, [X1, #16]
ADD X2, X1, X2
LDUR - Load unscaled Register.It loads the value from the address plus the offset given.here the base register won't be modified
LDUR R1,[R2,Imm] --- loads the value at the memory address (R2 + imm) [Imm - immediate] to R1 and the base register R2 is not modified
For the given question
LDUR X2,[X1,#6] --- the value present at (1000+16) is loaded into X2
so now X2 = 300 (because the value present at the address 1016 is 300)
ADD X2,X1,X2
X2 = X1+X2
X2 = 1000+300
X2 = 1300
Get Answers For Free
Most questions answered within 1 hours.