The techniques for specifying the address of operands are known as addressing modes.
Direct or Absolute Addressing :
In this mode the address of data is specified in instruction itself, i.e. the operands resides in the memory and its addresses are given directly by the address field of instruction. For example
STA 2500 H : Stores the content of accumulator in the memory location 2500H.
The instruction itself contains the operand address, there is no need to find the effective address of operand. Hence instruction executes fast. But for specifying operand address the number of bits is limited.
Register Addressing :
In register addressing the operands are located in general purpose registers. In other words the contents of a register is operand. Therefore only the names of registers are to be specified in instruction. For example
ADD B : Add the contents of register B to the contents of accumulator.
Register Indirect Addressing :
In this mode the address of operand is given indirectly. The contents of a register or a register pair are the address of operand. For example
LXI H, 2300H : Load H-L pair with 2300H.
MOV A, M : Move the content of memory location, whose address is in H-L pair( i.e. 2300H ), to the accumulator.
Immediate Addressing :
In this mode, operand is given in instruction itself. The operand field contains actual operand. This mode is useful for initializing registers to content value. For example
LXI H, 2500H : Load H-L pair with 2500H.
Implicit Addressing :
This mode is also called inherent addressing. Some instructions operate on only one operand, which is in the accumulator. So address need not be specified. For example
CMA : Take compliment of contents of accumulator.
1 Comments
Thanks for sharing with me.....sir
ReplyDelete