Home » Embedded Systems

Data Memory Addressing Mode in 8086

This article is in continuation of the previous article Categories of Addressing Modes of 8086 microprocessors. In this article, we are going to study about the different addressing modes which lie within Data Memory Addressing Mode.
Submitted by Monika Sharma, on July 19, 2019

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. 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

Ad: Are you a blogger? Join our Blogging forum.
Learn PCB Designing: PCB DESIGNING TUTORIAL




Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.