Saturday 2 July 2016

Addressing Modes In 8085

Addressing mode refers to the way of addressing an operand or a destination in a given memory location or a processor register. There are several addressing modes in 8085.

      1.Direct Addressing Mode
When instruction explicitly states the location of an operand or a destination(either in memory or in a processor register), the addressing mode is known as direct addressing. 
Direct addressing mode has two sub classes:-
  • Absolute Addressing: When the location is in memory the mode may be referred to as absolute addressing.

  • Register Direct Addressing: When the location is a processor register it may be referred to as RDA. Example: MOV A,B (Move the contents of B to A register)
          Here, MOV - Operand; A-Destination; B-Source;
Direct Addressing is used when the memory address or the selected register is to be remained fixed in the program,

Example: LDA 2500H
Here, 
         LDA - Operation and 
         2500H - Address of source
         Accumulator - Destination


      2. Immediate Addressing Mode

This mode of addressing includes a bit pattern as a part of an instruction. The op-word for the instruction includes a group of bits which identifies this mode of addressing and the post-word include the bit pattern itself.
It states the operand itself instead of its location.
Operand is specified within the instruction itself.

Example: MVI A, 05H (Move 05H in accumulator)
Here, 
          MVI - Operand
          A-Destination
          05H - Data (Source)


      3. Register Indirect Addressing Mode

The address of operand is specified within the instruction itself.
Example: MOV A,M (Move data from memory location specified by HL pair to accumulator)
Here,
         MOV - Operand
         A - Destination
         M - Location specified by HL pair


      4. Implicit Addressing Mode

If address of source of data as well as address of destination is fixed, then there is no need to give any operand along with the instruction.
Exampe: CMA (Complement accumulator)

No comments:

Post a Comment