Addressing mode of 8086 microprocessor part 1
For corrections and suggestions please mail to me at [email protected]
Register and Immediate Data Addressing Mode:
Register Addressing Mode: 8 or 16 bit data can be transmitting form source register/memory to destination register/memory as part of the instruction. In this mode used internal register of microprocessor as source and destination.
Example:
MOV DX, CX Moves 16 bit content of CX into DX.
MOV BL, CL Moves 8 bit content of CL into BL.
Immediate Addressing Mode: 8 or 16 bit data can be transmitting into destination register or memory as part of the instruction.
Example:
MOV CL, 03 H Moves the 8 bit data 03 H into CL
MOV BX, 2E70 H Moves the 16 bit data 2E70 H into BX
Memory Addressing Mode:
Direct Addressing Mode: In this addressing mode directly used 16-bit effective address as operand.
Example:
MOV CX, [5000]
If DS = 0050 (Offset no.) then BIU generates the 20 bit physical address 50050 H. The content of 50050 is moved to CL. The content of 50051 is moved to CH.
Register Indirect Addressing Mode: In This Addressing Mode indirectly used register to set memory location. The pointer (BX or BP) register or an index (SI or DI) register hold effective address of memory location. The 20 bit physical address is computed using DS and DI.
Example:
MOV BX, [DI]
If
Segment no. ( [DS] )= 5000
Offset no. ([DI]) = 0020
Physical Address = 5000*10 + 0020 = 50020
The content of 50020 and 50021 is moved to BX Register.
Base Addressing Mode: In base addressing mode sign 8-bits and unsigned 16-bits added with counter of BX and BP register and set effective address.
PA = (CS, DS, SS, ES): BX or BP) + 8 or 16 bit displacement
Example:
MOV AL, START [BX] or MOV AL, E7H [BX]
Effective Address (EA) = [START] + [BX]. The content of this memory is moved into AL.