LDR
Load 32-bit word to Memory.
Syntax LDR{cond} Rd, [Rn]
LDR{cond} Rd, [Rn, offset]
LDR{cond} Rd, [Rn, offset]!
LDR{cond} Rd, label
LDR{cond} Rd, [Rn], offset
Description LDR{cond} Rd, [Rn] (zero offset)
Rn is used as address value.
LDR{cond} Rd, [Rn, offset] (Pre-indexed offset)
Rn and offset are added and used as address value.
LDR{cond} Rd, [Rn, offset]{!} (Pre-indexed offset with update)
Rn and offset are added and used as address value. The new address value is written to Rn.
LDR{cond} Rd, label (Program-relative)
The assembler calculates the PC offset and generates LDR{cond} Rd, [R15, offset].
LDR{cond} Rd, [Rn], offset (Post-indexed offset)
Rn is used as address value. After memory transfer, the offset is added to Rn.
Example LDR R8,[R10] //loads r8 from the address in r10.
LDRNE R2,[R5,#960]! //(conditionally) loads r2 from a word 960 bytes above the address in r5, and increments r5 by 960.
LDR R0,localdata //loads a word located at label localdata