0

Addressing Modes of 8085 Microprocessor with Example

  • The method of specifying the location of operand in an instruction is called addressing mode. There are five types of addressing modes of 8085 microprocessor.

    1. Direct addressing mode
    2. Immediate addressing mode
    3. Register addressing mode
    4. Register indirect addressing mode
    5. Implicit (or) implied addressing mode

    Direct addressing mode

    In direct addressing mode, the address of the operand is directly specified in the instruction. In this addressing mode, the instruction is two or three bytes long. The first byte is the Opcode. The operand may be a 16-bit (2 bytes) memory address or an 8-bit (1 byte) port address.

    Examples:

    S. No
    Instructions
    Remarks
    1.
    STA 5000
    This instruction stores the content of the accumulator in memory location 5000. Here, the memory address is given directly in the instruction.
    2.
    LDA 5000
    This instruction loads the data from memory location 5000 accumulator. Here, the memory address is given directly in the instruction.
    3.
    IN 80
    This instruction loads the data from input port 80. Here, the port address is directly given in the instruction.



    Immediate addressing mode

    In immediate addressing mode, the operand itself is immediately given after the Opcode. The instruction is two or three bytes long. The first byte is the Opcode. The operand may be a 16-bit (2 bytes) immediate data or an 8-bit (1 byte) immediate data.

    Examples:

    S. No
    Instructions
    Remarks
    1.
    MVI A, 50
    This instruction immediately moves the data 50 into the accumulator. Here, the data is given immediately after the Opcode.
    2.
    LXI B, 2050
    This instruction immediately moves the data 2050 into the register pair BC. 20 to B register and 50 to C register. Here, the data is given immediately after the Opcode.


    Register addressing mode

    In register addressing mode, a register is specified as the operand in the instruction. The instruction is one byte long. The register name is specified in the Opcode itself.

    Examples:

    S. No
    Instructions
    Remarks
    1.
    ADD B
    This instruction adds the content of B register with the accumulator. Here, the data is in the register B.
    2.
    MOV C, D
    This instruction moves the D register value to C register. Here, C and D registers are specified as the operands.


    Register indirect addressing mode

    In register indirect addressing mode, the content of the register pair is used as the address of the operand in the instruction. The instruction is one byte long. The register pair contains the 16-bit address of the memory location where the actual operand is stored.

    Examples:

    S. No
    Instructions
    Remarks
    1.
    STAX B
    This instruction stores the accumulator value in memory location whose address is specified by the BC register pair. Here, the address is indirectly specified in the register pair.
    2.
    MOV A, M
    This instruction moves the data from memory to accumulator. M means memory whose address is specified in HL register pair. Here, address of the operand is indirectly specified in the HL register pair.


    Implicit or Implied addressing mode

    In implied addressing mode, a particular register is implicitly specified as the operand in the instruction. The instruction is one byte long. This addressing mode is also known as implied addressing mode and inherent addressing mode.

    Examples:

    S. No
    Instructions
    Remarks
    1.
    CMA
    This instruction complements the contents of the accumulator. Here, Accumulator is implicitly specified in the instruction.
    2.
    RLC
    This instruction rotates the contents of the accumulator left one time. Here, Accumulator is implicitly specified in the instruction.


    0 Responses to “Addressing Modes of 8085 Microprocessor with Example”

    Post a Comment

    Subscribe