1.2.4.4 Modes of addressing memory Flashcards
What are the four methods of addressing memory?
- Immediate
- Indexed
- Direct
- Indirect
What is immediate addressing?
Sometimes called an immediate operand, the value in the address part of the instruction is actually the value to be used, so the memory does not needed to be searched to find the required value
What is Direct addressing?
The value in the address part of the instruction is a reference to the address memory where the required value is located.
What is indirect addressing?
The value in the address part of the instruction is a reference to a memory location that contains the address in memory where the required value is located. This mode of memory is very useful as it means larger address ranges can be used to reference data and instructions.
It breaks the limitation of 4 bits for the operand.
What is indexed addressing?
Using an index register (IR). The IR is set to 0, so the first value is taken from 10 + 0.
After this is done, the IR is incremented and the same instruction is used again – this time, the address is 10 + 1. That is why an array needs to be stored in contiguous memory locations. We store the address for element 0 of the array in the index register and then increment.
instruction format of assembly code
Addressing Mode -> OpCode -> Operand (Address/data)