ADDRESSING MODES
The different ways in which the location of an Operand is specified in an instruction are addressing modes.
INSTRUCTION FORMAT
Effective Address = Address of Operand
Operand Value = Value at Effective Address
TYPES OF ADDRESSING MODES
There are various types of addressing modes -
DIRECT ADDRESSING
If the second part of instruction specifies the address of an Operand , then it is said that the instruction has a direct address or direct operand .
Example
Add r , 2000
* value at E.A. (2000) is 5
Therefore r + 5 → r
* Single Memory reference only.
USE : used to implement variables.
INDIRECT ADDRESSING
If the second part of an instruction code specifies an address of memory in which the address of the operand is obtained , then it is called indirect addressing.
Effective Address = 2000 = [1000]
Operand Value = [ E.A.] = [[1000]]
= [2000]
= 5
* It requires two memory references.
USE : used to implement pointer.