Skip to main content

Addressing modes of 8086

Short answer

8086 addressing modes: immediate, register, direct, register indirect ([BX], [SI], [DI]), based ([BX/BP]+disp), indexed ([SI/DI]+disp), based indexed ([BX/BP]+[SI/DI]±disp), string (use DS:SI and ES:DI), I/O port, relative (IP+disp), and implied. Physical address = segment×10H + effective address.

What do you mean by addressing mode? Explain the different types of addressing modes available in 8086 microprocessor with examples.

Addressing mode is the method by which the processor finds the operand (data) of an instruction. The 8086 has the following modes. Physical address = segment register × 10H + effective address (EA).

#ModeOperand location / EAExample
1ImmediateData is part of the instructionMOV AX,1234H
2RegisterOperand is in a registerMOV AX,BX
3DirectEA is given in the instruction (DS default)MOV AX,[2000H]
4Register indirectEA is in BX, SI or DIMOV AX,[BX]
5BasedEA = BX or BP + displacementMOV AX,[BX+04H]
6IndexedEA = SI or DI + displacementMOV AX,[SI+10H]
7Based indexedEA = BX/BP + SI/DIMOV AX,[BX+SI]
8Based indexed with displacementEA = BX/BP + SI/DI + dispMOV AX,[BX+SI+08H]
9StringSource DS:SI, destination ES:DI, auto inc/decMOVSB
10I/O port (direct, indirect)Port address in instruction or DXIN AL,80H, IN AL,DX
11RelativeSigned displacement added to IPJZ NEXT
12ImpliedOperand is implicit in the instructionCLC, CBW, XLAT

Details

  • Immediate: fast, no memory reference for the operand; it can only be a source.
  • Direct: MOV AX,[2000H] with DS = 3000H reads from 32000H.
  • Register indirect: with DS = 2000H, BX = 0100H, MOV AL,[BX] reads from 20100H.
  • Based/indexed: convenient for records and arrays. BP-based addressing uses SS as default segment (stack data), others use DS.
  • Based indexed: used for two-dimensional arrays: BX points to the array base, SI to the element.
  • String: used by MOVS, CMPS, SCAS, LODS, STOS; the direction flag (DF) decides whether SI/DI are incremented or decremented.
  • Relative: used by jump and call; short jumps use an 8-bit displacement (−128 to +127), near jumps use 16 bits.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Microprocessor chapter 3 questions →