AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
Syntax:          LDR {<cond>}{{S}<size>}{T} <destination>, <address>
Operation:     Data transfer from memory to the registers
Flags:          Unaffected

This instruction is used to transfer data from memory into the registers. A system of indirect addressing is used to specify the source location address - the address to be looked up is held in a register.
There are two forms of indirect <address>: Pre-indexed and Post-indexed. In addition to these two forms, a PC relative address can also be specified.

When T is specified,the LDR is translated to have the same priviledges as though loaded in user mode - hence a data abort will occur if a user mode program were to try to load from this address (regardless of the current mode).

If <size> is present,it may be preceded by S to indicate that instead of zero filling the remaining bytes the processor should sign extend the remaining bytes instead.This is only available from ARM architecture 4 and later.

When a fetch is made from a non word aligned address,the data will be rotated right by 8 times the value in lower two bits of address.Be warned that on ARM architecture 5 and later,if as a result of an LDR operation b0 of R15 is set the processor will switch into Thumb mode too.

[sh-index] Back to list of manuals