| |||
| Home > The Cortex-M0+ Instruction Set > Memory access instructions > LDR and STR, register offset | |||
Load and Store with register offset.
LDRRt, [Rn,Rm]
LDR<B|H>Rt, [Rn,Rm]
LDR<SB|SH>Rt, [Rn,Rm]
STRRt, [Rn,Rm]
STR<B|H>Rt, [Rn,Rm]
where:
RtIs the register to load or store.
RnIs the register on which the memory address is based.
RmIs a register containing a value to be used as the offset.
LDR, LDRB, LDRH, LDRSB and LDRSH load
the register specified by with
either a word, zero extended byte, zero extended halfword, sign
extended byte or sign extended halfword value from memory.Rt
STR, STRB and STRH store
the word, least-significant byte or lower halfword contained in
the single register specified by into
memory.Rt
The memory address to load from or store to is the sum of
the values in the registers specified by and Rn.Rm
In these instructions:
, Rt,
and Rn must only specify
R0-R7.Rm
the computed memory address must be divisible by the number of bytes in the load or store, see Address alignment.