Addressing Mode refers to the different ways in which a processor can access data.
The various Addressing Modes present in 8086 Microprocessor are:
- Immediate Addressing Mode
- Register Addressing Mode
- Direct Addressing Mode
- Register Indirect Addressing Mode
- Base Plus Index Addressing Mode
- Register Relative Addressing Mode
- Base Relative Plus Index Addressing Mode
A. Immediate Addressing Mode:
- Data immediately follow the hexadecimal opcode in the memory.
- Immediate data are constant data.
- It transfers the immediate data in Register or Memory location.
- For Example:
- MOV AL,20 H (copies 20 to AL)
- MOV AX,2050 H (copies 2050 to AX)
- MOV CL, 10000001B (copies Binary value to CL)
-
Instruction Source Destination MOV AL,30 H Data: 30 H Register AL
B. Register Addressing Mode:
- It is the most common form of data addressing.
- It transfers a byte/word form source register to destination register.
- It is carried out with 8 bit registers AH,AL,BH,BL,CH,CL,DH & DL or with 16 bit registers AX,BX,CX,DX,SP,BP,SI and DI.
- Never mix an 8 bit register with a 16 bit register i.e. MOV AX, BL.
-
Instruction Source Destination MOV AX,BX REGISTER BX REGISTER AX - For example:
- MOV AL, BL ( Copies BL into AL )
- MOV AX, CX ( Copies CX into AX )
- MOV ES, DS ( Copies DS into ES )
C. Direct Addressing Mode:
- The address of the data is defined in the instruction itself.
- When a memory location is to be referenced, its offset address must be specified.
-
Instruction Source Destination MOV AL,[1234H] ASSUME DS=1000H
10000H + 1234H= 11234H
MEMORY LOCATION 11234 HREGISTER AL - For Examples:
- MOV AL, [1234H] ( Copies the byte content of data segment memory location 11234H into AL.)
D. Register Indirect Addressing Mode:
- The offset address held in Base or Index Register[BP, BX, DI and SI] help to specify the data in a memory location.
- It transfers byte/word between a register and a memory location addressed by an index or base registers.
- The symbol [ ] denote indirect addressing.
-
Instruction Source Destination MOV CL,[BX] ASSUME DS=1000H
ASSUME BX=0300H
10000H + 0300H = 10300H
MEMORY LOCATION 10300HREGISTER CL - For Example:
- MOV CX, [BX] ( Copies the word contents of the data segment memory location addressed by BX into CX.)
- MOV [DI], BH (Copies BH into the data segment memory location addressed by DI.)
E. Base Plus Index Addressing Mode:
- This type of addressing uses one base register (BP or BX) and one Index Register (DI or SI) to indirectly address memory.
-
Instruction Source Destination MOV [BX+SI],CL REGISTER CL ASSUME DS=1000H
ASSUME BX=0300H
ASSUME SI =0200H
10000H + 0300H + 0200H = 10500H
MEMORY LOCATION 10500H - For Example:
- MOV CX, [BX+DI] (Copies the word contents of the data segment memory location addressed by BX plus DI into CX. )
F. Register Relative Addressing Mode:
- In this Addressing mode, the data in memory are specified by adding the displacement to the content of Base or an Index register (BP, BX ,DI or SI).
- Transfers a byte/word between a register and the memory location addressed by an index or base register plus a displacement.
Instruction Source Destination MOV [BX+4],CL REGISTER CL ASSUME DS=1000H
ASSUME BX=0300H
10000H + 0300H + 4H = 10304H
MEMORY LOCATION 10304H- For example:
- MOV [SI+4], BL : Copies BL into the data segment memory location addressed by SI plus 4.
G. Base Relative Plus Index Addressing Mode:
- The base relative plus index addressing mode is similar to the base plus index addressing mode but it adds a displacement to form a memory address.
- Transfers a byte or word between a register and the memory location addressed by a base and an index register plus a displacement.
Instruction Source Destination MOV [BX+SI+05],CL REGISTER CL ASSUME DS=1000H
ASSUME BX=0300H
ASSUME SI =0200H
10000H + 0300H + 0200H +05H = 10505H
MEMORY LOCATION 10505H- For example:
- MOV DH, [BX+DI+20H] : Copies the byte contents of the data segment memory location addressed by the sum of BX, DI and 20H into DH.
Conclusion:
Related Posts:
In assembly language statements, the addressing mode is indicated in the instruction itself. So these are the seven addressing modes in 8086 microprocessor.
Related Posts:
Addressing Modes in 8086 Microprocessor [Types of 8086 addressing modes]
Reviewed by Sandesh Shrestha
on
28 March
Rating:
No comments: