Study smarter with Fiveable
Get study guides, practice questions, and cheatsheets for all your subjects. Join 500,000+ students with a 96% pass rate.
Addressing modes in assembly language are essential for understanding how data is accessed and manipulated in computer architecture. These modes determine how operands are specified, impacting performance and efficiency in executing instructions. Each mode offers unique advantages for different programming scenarios.
Immediate Addressing
MOV R1, #5 (moves the value 5 directly into register R1).Register Addressing
ADD R1, R2, R3 (adds the values in R2 and R3, storing the result in R1).Direct Addressing
LOAD R1, 1000 (loads the value from memory address 1000 into R1).Indirect Addressing
LOAD R1, (R2) (loads the value from the address contained in R2 into R1).Base Register Addressing
LOAD R1, 100(R2) (loads the value from the address R2 + 100 into R1).Indexed Addressing
LOAD R1, (R2 + R3) (loads the value from the address calculated by adding R2 and R3 into R1).Relative Addressing
JMP LABEL (jumps to the address calculated by adding the offset of LABEL to the current instruction pointer).Stack Addressing
PUSH R1 (pushes the value in R1 onto the stack).