Data Memory Addressing Mode in 8086

In this tutorial, we will learn about the different addressing modes which lie within data memory addressing mode in 8086 Microprocessor. By Monika Sharma Last updated : May 15, 2023

In this type of addressing mode, first the offset address is calculated, then the memory address is calculated and then the operand form that memory location is fetched.

8086 Microprocessor Data Memory Addressing Mode

There are following modes which lie under the Data Addressing Mode:

  1. Direct Addressing Mode
  2. Base Addressing Mode
  3. Base Relative Addressing Mode
  4. Index Addressing Mode
  5. Index relative addressing mode
  6. Base plus Index Addressing Mode
  7. Base relative plus Index Addressing Mode

1) Direct Addressing Mode

In this addressing mode, the offset is specified within the instructions. What this means is that the offset address is directly stored within square brackets and is not present inside any register.

Example:

MOV AL, [4000H]
MOV [1234H], BX

2) Base Addressing Mode

In this addressing mode, the offset address for any operand is stored in the base register BX.

Example:

MOV AL, [BX]

3) Base Relative Addressing Mode

In this addressing mode also, the offset address is stored within the Base register but the difference is that there is some displacement present with it. This displacement can be either of 8 bits or 16 bits. Hence, the offset address will be equal to the contents of the base register + 8/16 bit displacement.

Example:

MOV AL, [BX + 05H]	{here, displacement is of 8 bits}
MOV AL, [BX+1243H] 	{here, displacement is of 16 bits}

4) Index Addressing Mode

In this addressing mode, the offset address is defined in the Index Register. (It should be noted here that the Index registers act as an offset for Data Segment as well.) So, the memory location of the operand is calculated with the help of DS and SI.

Example:

MOV BL, [SI]
MOV [SI], DH

5) Index relative addressing mode

In this addressing mode, the offset address is equal to the content of index register plus the 8 or 16-bit displacement. It is important to note here that the displacement in all relative addressing modes is a signed number, i.e. the displacement value can either be a positive or a negative hexadecimal number.

Example:

MOV BL, [SI + 07H]		{Here, the displacement is of 8 bits}
MOV BL, [SI – 3034H]  	{Here, the displacement is of 16 bits}

6) Base plus Index Addressing Mode

In this addressing Mode, the offset address is calculated by both the base register and the index register. Hence, the offset address will be equal to the content of the base register plus the content of the Index register.

Example:

MOV AL, [BX + SI]
MOV [BX + SI], CL

7) Base relative plus Index Addressing Mode

This addressing mode is almost same to the Base plus Index Addressing mode, but like the other relative addressing modes, the difference is only that this mode has a displacement of 8 or 16 bits.

Example:

MOV CL, [BX + SI + 0AH]     {here, the displacement is of 8 bits} 
MOV AL, [BX + SI + AE07H]   {here, the displacement is of 16 bits}




Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.