Addressing modes of 8086 Microprocessor

Implied (or implicit or Inherent) Addressing mode: The data value/data address is implicitly associated with the instruction. Example: 
    STC    ;set carry flag
    CLC    ;clear (reset) carry flag
    AAA    ;ASCII adjust after addition

Immediate Addressing mode: Data required for executing the instruction is given directly along with the instruction. Example: 
    MOV AL, 78H
    MOV CX, 234AH 
    ADD AL, 23H 

Register Addressing mode: Data required for executing the instruction is present in the register.Example:
    MOV AL, BL     ;transfers the content of BL to AL register pair
    MOV DX, BX    ;transfers the content of BX to DX register pair 

Direct Addressing mode: Data required for executing the instruction is present in the memory location and the effective address of the memory location is given directly along with instruction. Example: 
    MOV AL, [4371H]     ;copies 16-bit word into a memory pointed by the displacement address 4371H to the AL register. 

Register Indirect Addressing mode: Data required for executing the instruction is present in the memory location and effective address of this memory location is present in the base or index register along with instruction. Example: 
    MOV AX, [BX]     ;copies the word-sized data from data segment offset address indexed by BX into AX

Register Relative Addressing mode: Data required for executing the instruction is present in the memory location and effective address of this memory location is obtained by adding the displacement value with register value. Example:
    MOV AX, [BX+4] 

Base-Plus-Index Addressing mode: Data required for executing the instruction is present in the memory location and effective address of this memory location is obtained by adding base register and index register value. Example:
    MOV AX, [BX+SI]
    MOV [BX+SI], CX

Based-Plus-Index with Displacement Addressing mode: Data required for executing the instruction is present in the memory location and effective address of this memory location is obtained by adding base register, index register and displacement. Example:
    MOV AX, [BX+DI+4]
    MOV [BX+DI+6], CX

No comments:

Post a Comment