ARM v7 ADD vs. LDR

789 Views Asked by At

Is there any difference between the following instruction (besides flags affection)?

ADD             R6, SP, #0xDC

and

LDR             R6, [SP, #0xDC]
1

There are 1 best solutions below

0
On

ADD adds numbers, LDR loads data from memory to registers.

ADD R6, SP, #0xDC   -> R6 = SP + 0xDC
LDR R6, [SP, #0xDC] -> R6 = memory_contents_of_address(SP + 0xDC)