Addressing modes (Cambridge International AS Computer Science)
Exam board Cambridge International · ASUpdated 2025-04-08
Addressing methods
What is an addressing method?
-
An addressing method is a way in which an instruction in assembly language or machine code can access data stored in memory
-
There are five main addressing methods:
- Immediate
- Direct
- Indirect
- Indexed
- Relative
| Addressing mode | Description | Example instruction | Explanation |
|---|---|---|---|
| Immediate | The operand is a constant value included directly in the instruction | MOV AX, 1234h | Moves the immediate value 1234h into the AX register |
| Direct | The exact memory address of the operand is given in the instruction | MOV AX, [1234h] | Moves the value stored at memory location 1234h into the AX register |
| Indirect | A register contains the memory address of the operand | MOV AX, [BX] | If BX = 2000h, this moves the value at memory location2000h into AX |
| Indexed | Uses a base register and an index to calculate the memory address | MOV AX, [BX + SI] | If BX = 0050h and SI = 1000h, this moves the value at1050h into the AX register |
| Relative | The operand is an offset relative to the current instruction address | JMP +5 | Tells the program to jump forward 5 instructions from the current line Used in branching |
Was this revision note helpful?
Build on this topic