Addressing Modes

Instruction consists of two parts, operational code and data called operands.The operands may be source only, destination only or both of them.In there instructions, the source  can be register, an input port, or a memory locations. Similarly, a destination can be register, an output port or a memory location.
The various format of specifying the operand are called Addressing Modes.

There are Five types of addressing mode of 8085 microprocessor and they are


  1. Direct Addressing Mode
  2. Register Indirect Addressing Mode
  3. Register Direct Addressing Mode
  4. Implied Addressing Mode
  5. Immediate Addressing Mode

  1. Direct Addressing Mode:- In this addressing mode, the operand consist of either 16 bit memory address or 8 bit port address as the part of the instruction. For example: LDA 2000H This instruction consist of 16 bit memory address ( 2000H)  as the part of the instruction . And this instruction will copy the contents of memory address 2000H into the accumulator .                     Next example:- IN 40H  This instruction consist of 8 bit port address ( 40H) as the part of the instruction. And this instruction will copy the contents of port address 40H into the accumulator.                                                                                                                                                     
  2. Register Indirect Addressing Mode:- In this addressing mode ,the address part of the instruction specifies the memory location whose content's is the address of the operands. or we can say that the instruction will use the register pair will be indirectly use for memory addressing . For Example: LDAX B , This instruction BC register pair is indirectly used for memory addressing . The data from the memory address pointed by BC register pair will be loaded in the accumulator.                                                                                                               we can take another example of  instruction MOV A,M . In this instruction the register pair HL is indirectly used for memory addressing , or here HL is used as the memory pointer. And this instruction will copy the contents for memory location pointed by HL register pair into the accumulator.                                                                                                                                            
  3. Register Direct Addressing Mode:- This addressing mode operand  specifies the register or register pair that contains the data. The source and the destination part both contains the register or the register pair. For Example:- MOV A,C   In this instruction the source and the destination both are the register , And this instruction will simply copy the contents of register C into register B.                                                                                                                                          
  4. Immediate Addressing Mode:- In this addressing mode, the operand part consist of either 8 Bit or 16 bit data. For example:- MVI A,32H  here we can see that the operand part consist of  8 bit data(32H) and this instruction will load 32H data into Accumulator.                                                
  5. Implied or Inherent Addressing Mode:- The instructions of this addressing mode do not have operands at all. For example:  STC ( set the carry flag) In this instruction there is no operand attached with the instruction. And this instruction will simply set the carry  flag.                                                                                                                                                                                                                                                                                  


No comments: