In: Electrical Engineering
Immediate addressing :The operand is specified in the instruction itself. An immediate mode instruction has an operand field rather than the address field.
For example: ADD 3, which says Add 3 to contents of accumulator. 3 is the operand here.
Direct addressing: Effective address of operand is present in instruction itself.
For example: ADD R1,4000
- In this the 4000 is
effective address of operand and R1 contents will be added with
contents of 4000 address
Indexed addressing: The content of base address the array is added to the index or offset(index) to obtain effective address value
For example: LOAD R1, 1000[BX]
BX is index and 1000 is base address
Indirect addressing: The instruction specifies the register whose contents give us the address of operand which is in memory. Thus, the register contains the address of operand rather than the operand itself.
For example: LOAD R1, @100 Load the content of memory address stored at memory address 100 to the register R1.