Addressing Modes of 8086

Immediate - The data is provided in the instruction.
Eg.
    1. MOV BL, 26H ;Copies 8-bit data 26H into BL register
    2. MOV CX, 4567H      ;Copies 16-bit data 4567H into CX register pair


Implicit - Such Instruction does not have any Operand.
Eg.
    1. STC                  ;sets the carry flag to one


Direct - The instruction operand specifies the memory address (offset) where data is
located.
Eg.
    1. MOV CL, [9823H]     ;9823H is the effective address [EA] directly written in the
       instruction


Register - References the data is in a register or in a register pair.
Eg.
    1. MOV BX, CX          ;Copies the 16-bit contents of CX into BX
    2. MOV CL, BL          ; Copies 8-bit contents of BL into CL.


Register Indirect - Instruction specifies a register containing an address, where data is
located. This addressing mode works with SI, DI, BX and BP registers.

Eg. GIVEN INFO: [DI]=0030H, DS=7205H

   1. MOV [DI], BX          ;Here, Effective Address (EA)=[DI]
                            ;Physical Address (PA)=10H*DS+EA72050H+0030H=72080H
                            ;Contents of BX pair is copied to 72080H & 72081H resp.


Based Indexed - The contents of a base register (BX or BP) is added to the contents of an
index register (SI or DI), the resulting value is a pointer to location where data resides.

Eg. GIVEN INFO: [AX] =1000H, [BX] =1530H, TOT=08H (displacement), [SI] =1000H,
DS=4000H

   1. MOV AX, [BX] [SI]     ; EA=[BX]+[SI] = 1530H+1000H  EA=2530H
                            ;PA=10H*DS+EA = 40000H+2530H=42530H

   2. MOV TOT [SI] [BX], CL ; EA=[BX]+[SI]+offset = 1530H + 1000H + 0008H
                          ; PA=10H*DS+EA40000H+2583H=42538H




J.G. Shewaramani
                                                                                     Page 1
Addressing Modes of 8086


Register Relative– 8-bit or 16-bit displacement is added with contents of any one of BX,
BP, SI, DI

Eg. GIVEN INFO: [BX] =1000H, DS=4000H

   1. MOV AX, 50H [BX]      ; EA = [BX]+50H = 1050H
                            ; PA= 10H*DS+EA40000H+1050H=41050H


Relative Based Indexed - 8-bit or 16-bit instruction operand is added to the contents of a
base register (BX or BP) and index register (SI or DI); the resulting value is a pointer to
location where data resides.

Eg. GIVEN INFO: [BX] =2000H, [SI] =1000H, DS=4000H

   1. MOV AX, 5000[BX] [SI] ;EA=[BX]+[SI]+displacement2000H+1000H+5000H
                         ;PA=10H*DS+EA = 40000H+8000H=48000H




J.G. Shewaramani
                                                                                     Page 2

8086 addressing modes

  • 1.
    Addressing Modes of8086 Immediate - The data is provided in the instruction. Eg. 1. MOV BL, 26H ;Copies 8-bit data 26H into BL register 2. MOV CX, 4567H ;Copies 16-bit data 4567H into CX register pair Implicit - Such Instruction does not have any Operand. Eg. 1. STC ;sets the carry flag to one Direct - The instruction operand specifies the memory address (offset) where data is located. Eg. 1. MOV CL, [9823H] ;9823H is the effective address [EA] directly written in the instruction Register - References the data is in a register or in a register pair. Eg. 1. MOV BX, CX ;Copies the 16-bit contents of CX into BX 2. MOV CL, BL ; Copies 8-bit contents of BL into CL. Register Indirect - Instruction specifies a register containing an address, where data is located. This addressing mode works with SI, DI, BX and BP registers. Eg. GIVEN INFO: [DI]=0030H, DS=7205H 1. MOV [DI], BX ;Here, Effective Address (EA)=[DI] ;Physical Address (PA)=10H*DS+EA72050H+0030H=72080H ;Contents of BX pair is copied to 72080H & 72081H resp. Based Indexed - The contents of a base register (BX or BP) is added to the contents of an index register (SI or DI), the resulting value is a pointer to location where data resides. Eg. GIVEN INFO: [AX] =1000H, [BX] =1530H, TOT=08H (displacement), [SI] =1000H, DS=4000H 1. MOV AX, [BX] [SI] ; EA=[BX]+[SI] = 1530H+1000H  EA=2530H ;PA=10H*DS+EA = 40000H+2530H=42530H 2. MOV TOT [SI] [BX], CL ; EA=[BX]+[SI]+offset = 1530H + 1000H + 0008H ; PA=10H*DS+EA40000H+2583H=42538H J.G. Shewaramani Page 1
  • 2.
    Addressing Modes of8086 Register Relative– 8-bit or 16-bit displacement is added with contents of any one of BX, BP, SI, DI Eg. GIVEN INFO: [BX] =1000H, DS=4000H 1. MOV AX, 50H [BX] ; EA = [BX]+50H = 1050H ; PA= 10H*DS+EA40000H+1050H=41050H Relative Based Indexed - 8-bit or 16-bit instruction operand is added to the contents of a base register (BX or BP) and index register (SI or DI); the resulting value is a pointer to location where data resides. Eg. GIVEN INFO: [BX] =2000H, [SI] =1000H, DS=4000H 1. MOV AX, 5000[BX] [SI] ;EA=[BX]+[SI]+displacement2000H+1000H+5000H ;PA=10H*DS+EA = 40000H+8000H=48000H J.G. Shewaramani Page 2