Featured Post

Pin Diagram Of 8086 Microprocessor: The Hardware Model

The 8086 is a 16-bit microprocessor intended to be used as the CPU in a microcomputer. The 8086 Microprocessor - Internal Architecture sh...

Recent Posts

Addressing modes Of 8086 Microprocessor

The 8086 microprocessor accesses the data in different ways such as from different registers, from memory locations or from I/O ports are called its addressing modes. These addressing modes are categorized according to the accessing method. These  are as follows.
1. Register Addressing Modes (Accessing data from registers)
2. Immediate Addressing Modes (Accessing immediate data and storing in the register as an operand )
3. Memory Addressing Modes (Accessing data from memory)
4. Direct Addressing Modes (Accessing direct data from I/O port)
Again some instruction are classified according to their behavior or condition, these are as follows.
5. Relative addressing modes (Related with some condition)
6. Implied or Implicit addressing mode (No operands)

1. Register Addressing Modes

In register addressing mode, most 8086 instructions can operate the general purpose register to set as an operand to the instruction. This means a register is a source of an operand as well as the register is only the destination of an operand for an instruction. 
MOV destination, source;
This instruction copies the data from the source location to the destination location. The 8-bit or 16 bit registers are certainly valid operands for this instruction. But both operands should be in  the same size. Now let's see some 8086 MOV instructions:

MOV AX, BX; Copies the 16 bit value from BX into AX,
Here the contents of AX is overlapping, but the contents of BX are not changed. (Both registers are in same size)


MOV DL, AL; Copies the value from AL into DL
MOV SI, DX; Copies the value from DX into SI
MOV SP, BP; Copies the value from BP into SP
MOV CH, CL; Copies the value from CL into CH
MOV AX, AX; yes, this is legal!

2. Immediate Addressing Modes

In immediate addressing mode, the hexadecimal number either 8-bit or 16-bit to be loaded immediately into the memory locations or consecutive memory locations respectively. i.e to load 8-bit immediate number into an 8-bit memory location or to load a 16-bit immediate number into two consecutive memory locations. Some examples of that instructions.


MOV CX, 437BH; copies 16-bit hexadecimal number 437BH in the 16-bit CX register
MOV CL, 48H; Load the 8-bit immediate number 48H into the 8-bit CL register

3. Memory Addressing Mode:

The memory addressing modes are used to specify the location of an operand as memory. To access data in memory, the 8086 should be produce a 20-bit physical address. It does this by adding a 16-bit value called the effective address (EA). The effective address represents the displacement or offset of the desired operand from the segment base. The data segment is most often used as a segment base.
MOV AL, [BX]; ADD the contents of DS (One of four segment bases) with BX and result will shift in AL register.

MOV AL, [BP]; same as above
The square bracket around the registers i.e. BX, BP are shorthand for “the contents of that registers at a displacement from the segment base of ." 

4. Direct Addressing modes

This addressing mode is called direct because the displacement or offset of the operand from the segment base is specified directly in the instruction.
MOV CL, [437AH]; copy the contents of the memory location , at a displacement of 437AH from the data segment base , into the CL register.
MOV BX [437AH]; copies a word from memory into the BX register.
Note: each memory address represents a byte of storage, the word must come from two memory locations. The byte at a displacement of 437AH from the data segment base will be copied into BL. The contents of the next higher address, displacement 437BH will be copied into the BH register. The 8086 will automatically access the required number of bytes in memory for a given instruction. 

5. Relative addressing modes

This addressing mode is a relation base. The data is stored either in base pointer (BP) or in BX.
Example: MOV AX, [BP +1] 
JMP [BX + 1]
JNC START : if CF=0 or not carry then start the PC 

6. Implicit or Implied addressing modes

In this addressing mode no operands are used to execute the instruction. 
Example: NOP : No operation
CLC : Clear carry flag to 0
START : Start execution

How you found this article, is this useful? I'm sure this will help you more. If you want more information please let me know through comments in the right below.
Subscribed to the My Computer Tutors for updates. I will keep updating to you with latest tutorials.

For Updates Please Click Here

Site Search