0
5.3kviews
Explain the addressing modes of 8086 microprocessor.

Subject: Microprocessor and Peripherals Interfacing

Title: Architecture of 8086 Microprocessor

Difficulty: High

1 Answer
1
191views

Addressing modes are used to specify the address of the data or data in instructions. It is basically the way of specifying data in instruction. There are various such ways, addressing modes for data memory:

  1. Immediate Addressing Mode

In this mode the operand is specified in the instruction itself. Instructions are longer but the operands are easily identified.

Eg: MOV CL, 24H ; Moves 24 immediately into CL register

        MOV BX, 5134H  ;        Moves 5134 immediately into BX register
  1. Register Addressing Mode

    In this mode operands are specified using registers. Instructions are shorter but operands can’t be identified by looking at the instruction.

    Eg: MOV CL, BL ; Moves data of BL register into CL register

           MOV AX, CX   ;       Moves data of CX register into AX register
    
  2. Direct Addressing Mode

    In this mode address of the operand is directly specified in the instruction. Here only the offset address is specified, the segment being indicated by the instruction.

Eg: MOV CL, [5221H] ; Moves data from location 5221H in the data segment into CL; The physical address is calculated as: DS * 10H + 5221;

Assume DS = 5000H; ∴ P A= 50000 + 5221 = 52221H.

Eg: MOV CX, [4320H] ; Moves data from location 4320H and 4321H; in the data segment into CL and CH respectively.

  • Indirect Addressing Modes
  • Register Indirect Addressing Mode

    In this mode the µP uses any of the 2 base registers BP, BX or any of the two index registers SI, DI to provide the offset address for the data byte. The segment is indicated by the Base Registers: BX -- Data Segment, BP --- Stack Segment

Eg: MOV CL, [BX] ; Moves a byte from the address pointed by BX in Data Segment into CL.

Physical Address calculated as DS * 10H + BX Eg: MOV [BP], CL ; Moves a byte from CL into the location pointed by BP in Stack Segment. ; Physical Address calculated as SS * 10H + BP
• Register Relative Addressing Mode In this mode the operand address is calculated using one of the base registers and a 8-bit or a 16-bit displacement.

Eg: MOV CH, [BX+6] ; Moves a byte from the address pointed by BX+6 in Data Segment to CH; Physical Address: DS * 10H + BX + 6H

Eg: MOV [BP+8], CH ; Moves a byte from CH to location pointed by BP+8H in the Stack Segment;

Physical Address: SS * 10H + BP + 8H

  • Base Indexed Addressing Mode

    Here, operand address is calculated as Base register plus an Index register.

Eg: MOV CL, [BX+SI] ; Moves a byte from the address pointed by BX+SI in Data Segment to CL.

Physical Address: DS * 10H + BX + SI

Eg: MOV [BP+DI], CL ; Moves a byte from CL into the address pointed by BP+DI in Stack Segment.

Physical Address: SS * 10H + BP + DI

  • Base Relative plus Index Addressing mode In this mode the address of the operand is calculated as Base register plus Index register plus 8-bit or 16-bit displacement.

Eg: MOV CL, [BX+DI+10] ; Moves a byte from the address pointed byBX+SI+10H in Data Segment to CL.

Physical Address: DS * 10H + BX + SI+ 10H

Eg: MOV [BP+SI+4000], CL ; Moves a byte from CL into the location pointed by BP+SI+4000H in Stack Segment.

Physical Address: SS * 10H + BP+SI+4000H

  • Implied Addressing Mode In this addressing mode the operands are implied and are hence not specified in the instruction.

Eg: STC ; Sets the Carry Flag.

Eg: CLD ; Clears the Direction Flag

Please log in to add an answer.