What is Addressing Mode? Short Note on Addressing Mode. Discuss about Addressing Mode. What is Addressing Mode ? Different types of Addressing Mode
Addressing Mode :-
Each instruction requires certain data on which it has to operate There are different technique in represent data for instruction, these technique are called addressing mode.
1) Direct addressing
2) Register addressing
3) Register indirect addressing
4) Immediate addressing
5) Implicit addressing
1) Direct Addressing
In this mode of addressing the address of the operand (data) is given in the instruction itself.
Example:-
1) STA 2500H (store the content of Accumulator in the memory location 2500)
In this instruction 2500H is the memory address where data is to be stored. It is given in the instruction specify the address of the memory location the source of the data is accumulator.
2) IN62 (read data from port C)
In this instruction 62 is the address of the port C of an input/output port from where the data is to be read. It is implied that the destination is the accumulator. The 2nd byte of the instruction specifies address of the port.
2) Register Addressing
In register addressing mode the operands are in the general purpose register. The op code specifies the address of the register in addition to the operation to be performed.
Example are :-
1) MOV A P (move the content of register B to accumulator)
The op code for MOV A B is 78H. Beside the operation to be performed the op code also specifies the registers which contain data. The op code 78H can be written in binary form on the first two bits (01) are for MOV operation, the next 3 bits (111) are the binary code for registers A and the last three bits (000) are the binary code
2) ADD P (Add the content register B to the accumulator).
The op code for ADD B is 80H,in the instruction one of the operands is register B which is in direction the instruction .the op code 80H can be written in binary form as 10000000. The first five bits (10000) specify the operation to be performed, Let ADD. The last three bits(000) are the binary codes for register B for 8085 up.
3) Register Indirect Addressing
In this mode of addressing the address of the operand is specified by a register pair.
Example are :
LXI H,2500H
MOV A, M
RST1
The instruction MOV A, M is example of register indirect addressing. For this instruction the operand is in the memory. The address of the memory is not directly given in the instruction. The address of the memory resides in H-L pair and this has already been specified by an earlier instruction in the program, i.e. LXIH, 2500H
4) Immediate Addressing
In immediate addressing mode the operand is specified within the instruction itself.
Examples are :
1) MVI A, 05 (Move 05 in register A immediately)
2) ADI, 09 (Add 09 to the content of A immediately)
3) LXI H, 2600H (2600 is to be loaded into H-L pair)
5) Implicit Addressing
There are certain instruction, which operate on the content of the accumulator ,such instruction do not require the address of the operand.
Examples are :
CMA, RAL and RAR.
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment