Addressing
Different addressing modes specify where an operand is located, can be any of: a constant, a register, or a memory location.
Certain addressing modes allow us to dynamically determine this address.Effective address
The effective address is the actual location of an operand.
Link to original
Types of addressing:
- Immediate: the data is part of the instruction.
- Direct: address of the data is given in the instruction.
- Register: data located in register.
- Indirect: address of address of data is given.
- Register indirect: register stores address of the address of data.
- Indexed: uses a register (implictly or explicitly) as an offset, which is added to the address in the operand to determine the effective address of the data.
- Based: similar to indexed, except that a base register is used instead of an index register. A base register holds a base address which is used to displace the given address, think of the given address (in the instruction) as a relative address to the base address. Meanwhile an index register holds the offset relative to the address given in the instruction.
- Stack: the operand is assumed to be on the top of the stack.