0

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

ADD             R6, SP, #0xDC

and

LDR             R6, [SP, #0xDC]
Martin G
  • 17,357
  • 9
  • 82
  • 98
badeip
  • 602
  • 8
  • 9
  • FYI, I downvoted your question, as you didn't even take a look at ARM infocenter before asking the meaning of the mnemonics. If you did, and didn't understand the explanations there, it would be totally acceptable, but you should then quote the parts you did not understood, to allow people to make it clearer. – Jacen Oct 08 '15 at 15:31

1 Answers1

7

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)
kauppi
  • 16,966
  • 4
  • 28
  • 19