Immediate addressing mode uses a constant value directly in the instruction itself. This means the operand is part of the instruction, not stored in memory or a register.
Register addressing mode means the operand is the value inside a register. The instruction specifies which register to use.
LDR R1, [R2, #4], what address is used to load the value into R1?The instruction loads data from the memory address calculated by adding 4 to the value in register R2. This is offset addressing mode.
Indexed addressing mode computes the memory address by adding two registers, often a base and an index register.
STR R0, [R1, R2, LSL #2]. What does this instruction do?This instruction stores the value in R0 into the memory address computed by adding R1 and the value of R2 shifted left by 2 bits (multiplied by 4). This is a form of register offset addressing with scaling.
