ARM is a RISC (Reduced Instruction Set Computing) architecture, meaning that memory must be moved to and from registers using the instructions you refer to, instructions for loading and storing.
Download instructions take one value from memory and write it to the general register. Storage instructions read the value from the general register and store it in memory.
Most Often Used Load/Store Instructions
Loads Stores Size and Type LDR STR Word (32 bits) LDRB STRB Byte (8 bits) LDRH STRH Halfword (16 bits) LDRSB Signed byte LDRSH Signed halfword LDM STM Multiple words
(taken from the ARM assembly language - William Hohl)
Instructions for loading and storing (in general) are given in the following form:
LDR | STR {type}{cond} Rt, [Rn {,
(although there are some differences depending on the type of addressing mode you want to use, but I will not go into this here if you want to know more addressing modes, you should check "ARM post-index and pre-indexing" )
"Type" is optional and is described in the table above, where you can choose to work with halfwords, bytes, as well as signed or unsigned bytes or halfwords. You also have the option to load or save multiple registers.
You also have the opportunity to add a condition code to the instruction (cond), which is used to set the flags of the conditions stored in the Status Register of the current program (CPSR) - if you want to know more about this, you can search for "conditional execution ARM" and " condition codes. "
In ARM, you must provide the source / destination register. And you must also provide a register containing an address that refers to a location in memory. This is because the ARM instruction is a fixed length (32 bits), and some of these bits must be used for the command itself, so it is not possible to encapsulate a 32-bit memory address into a 32-bit ARM instruction.
In the above example, “Rt” is the register in which the value that you load from memory (or the register containing the value that you store in memory if you are executing the storage) will be loaded. "Rn" is a register containing an address. Square brackets are in place to tell the processor that we are working with a register that contains the address that we are working with the pointer. An additional bias is present if you want to compensate for a certain amount from the base register (this is convenient in all types of useful applications, but I will not cover them here).
Hope this gives you some insight into how ARM loading and storing instructions work! :)