Atmel SAM4S Xplained Pro Starter and Evaluation Kit ATSAM4S-XPRO ATSAM4S-XPRO Hoja De Datos
Los códigos de productos
ATSAM4S-XPRO
SAM4S Series [DATASHEET]
Atmel-11100G-ATARM-SAM4S-Datasheet_27-May-14
110
12.6.4.5 LDR, PC-relative
Load register from memory.
Syntax
Syntax
LDR{type}{cond} Rt, label
LDRD{cond} Rt, Rt2, label
; Load two words
where:
typeis one of:
Bunsigned byte, zero extend to 32 bits.
SBsigned byte, sign extend to 32 bits.
Hunsigned halfword, zero extend to 32 bits.
SHsigned halfword, sign extend to 32 bits.
-omit, for word.
condis an optional condition code, see
typeis one of:
Bunsigned byte, zero extend to 32 bits.
SBsigned byte, sign extend to 32 bits.
Hunsigned halfword, zero extend to 32 bits.
SHsigned halfword, sign extend to 32 bits.
-omit, for word.
condis an optional condition code, see
.
Rtis the register to load or store.
Rt2is the second register to load or store.
labelis a PC-relative expression. See
Rt2is the second register to load or store.
labelis a PC-relative expression. See
Operation
LDR loads a register with a value from a PC-relative memory address. The memory address is specified by a label
LDR loads a register with a value from a PC-relative memory address. The memory address is specified by a label
or by an offset from the PC.
The value to load or store can be a byte, halfword, or word. For load instructions, bytes and halfwords can either
The value to load or store can be a byte, halfword, or word. For load instructions, bytes and halfwords can either
.
label
must be within a limited range of the current instruction. The table below shows the possible offsets between
label
and the PC.
The user might have to use the .W suffix to get the maximum offset range. See
.
Restrictions
In these instructions:
In these instructions:
Rt
can be SP or PC only for word loads
Rt2
must not be SP and must not be PC
Rt
must be different from Rt2.
Table 12-19.
Offset Ranges
Instruction Type
Offset Range
Word, halfword, signed halfword, byte, signed byte
-4095 to 4095
Two words
-1020 to 1020