Addressing Modes of Intel 8086 Microprocessor


In this article, all the 12 addressing modes supported by the Intel 8086 microprocessor i.e. immediate, direct, register, register indirect, indexed, register relative, based indexed, relative based indexed, intra segment direct, intra segment indirect, inter segment direct, inter segment indirect are briefly discussed with an example for each.

Addressing Modes

Address can be defined as a location in the memory. To locate data i.e. operands in the memory, different modes called addressing modes are used. There are two types of instructions called sequential control flow instructions and control transfer instructions. If a set of instructions are such that control shifts from one instruction to its next instruction, they are referred to as sequential control flow instructions. On the other hand, if a set of instructions are such that control shifts from one instruction to a predefined address where instructions for a particular procedure etc,. are located and control returns to the current position after execution of all the instructions in the predefined address, they are what called as control transfer instructions. Instructions like ADD, SUB are sequential control flow instructions whereas instructions like JUMP, CALL are control transfer instructions.

Addressing Modes for sequential control flow instructions

Intel 8086 microprocessor supports eight different addressing modes for sequential control flow instructions. They are:

Immediate Addressing Mode
If data is present in the instruction itself, it is called immediate addressing mode. For example,
ADD AL, 01H
SUB BL, 04H
are two instructions following immediate addressing mode as the data 01H or 04H is directly present in the instruction itself.

Direct Addressing Mode
If data is present at the 16-bit address mentioned in the instruction, it is called direct addressing mode. For example,
MOV AX, [1111H]
MOV BX, [4444H]
are two instructions following direct addressing mode. Here, effective address is 10H * DS + 1111H for the first example and 10H * DS + 4444H for the second example. Effective address can be defined as the actual address where data i.e. operands is located.

Register Addressing Mode
If data is present in registers mentioned in the instruction, it is called register addressing mode. For example,
ADD AX, BX
SUB BL, AL
are two instructions following register addressing mode. Here, data i.e. operands is present in registers AX, BX for the first example and in AL, BL for the second example.

Register Indirect Addressing Mode
If data is present in the address equal to the value of data in a register mentioned in the instruction, it is called register indirect addressing mode. For example,
MOV AX, [BX]
MOV BX, [AX]
are two instructions following register indirect addressing mode. Here, effective address is 10H * DS + [BX] for the first example and 10H * DS + [AX] for the second example.

Indexed Addressing Mode
If offset of the data i.e. operands is stored in one of the index registers like SI, it is called indexed addressing mode. For example,
MOV AX, [SI]
MOV BX, [DI]
are two instructions following indexed addressing mode. Here, effective address is 10H * DS + [SI] for the first example and 10H * DS + [DI] for the second example.

Register Relative Addressing Mode
If data is located at an address equal to sum of a value and contents of a register, it is called register relative addressing mode. For example,
MOV AX, 40H[BX]
MOV BX, 10H[AX]
are two instructions which follow register relative addressing mode. Here, effective address is 10H * DS + 40H + [BX] for the first example and 10H * DS + 10H + [AX] for the second example.

Based Indexed Addressing Mode
If data is located at an address equal to the sum of values in a register and an index register like DI, it is called based indexed addressing mode. For example,
MOV AX, [BX][SI]
MOV BX, [AX][DI]
are two instructions which follow based indexed addressing mode. Here, effective address is 10H * DS + [BX] + [SI] for the first example and 10H * DS + [AX] + [DI] for the second example.

Relative Based Indexed Addressing Mode
If data is located at an address equal to sum of a value and data in a register and data in an index register, it is called relative based indexed addressing mode. It is a combination of register relative addressing mode and based indexed addressing mode. For example,
MOV AX, 40H[BX][SI]
MOV BX, 10H[AX][DI]
are two instructions following relative based indexed addressing mode. Here, effective address is 10H * DS + 40H + [BX] + [SI] for the first example and 10H * DS + 10H + [AX] + [DI] for the second example.

Addressing Modes for control transfer instructions

Intel 8086 microprocessor supports four different addressing modes for control transfer instructions. They are:

Intra Segment Direct Mode
If the location to which control is to transferred is in the same segment, it is called intra segment mode. If address to which the control is to be transferred appears directly in the instruction as a displacement value, it is what called as intra segment direct mode. For example,
JMP SHORT LABEL;
is a control transfer instruction following intra segment direct mode. Here, SHORT LABEL represents a signed displacement.

Intra Segment Indirect Mode
If the location to which control is to transferred is in the same segment, it is called intra segment mode. If address to which the control is to be transferred appears indirectly in the instruction, it is what called as intra segment indirect mode. For example,
JMP [AX];
is a control transfer instruction following intra segment indirect mode.

Inter Segment Direct Mode
If the location to which control is to transferred is not in the same segment, it is called inter segment mode. If address of segment to which the control is to be transferred and location in the segment appears directly in the instruction, it is what called as inter segment direct mode. For example,
JMP 2000H : 3000H;
is a control transfer instruction following inter segment direct mode. Here, Jump is to effective address 3000H in segment at 2000H.

Inter Segment Indirect Mode
If the location to which control is to transferred is not in the same segment, it is called inter segment mode. If address of segment to which the control is to be transferred and location in the segment appears indirectly in the instruction, it is what called as inter segment indirect mode. For example,
JMP [5000H];
is a control transfer instruction following inter segment indirect mode.


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: