0% found this document useful (0 votes)
6 views

Gitika

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Gitika

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

4.

1 Instruction
Format and
Addressing Modes
in 8086 ,
Assembler &
Directives
Addressing Modes of 8086

❑ Addressing mode is defined as the way of specifying the data to be


operated by an instruction.
❑ It specifies that the given data is an immediate or an address.
❑ The addressing modes of any processor can be broadly classified as:
1.Data addressing modes
2.Program memory addressing mode
3.Stack memory addressing mode
Data Addressing Modes

• Immediate Addressing Mode • Indirect Addressing Mode:-


• Register Addressing Mode 1.Register Indirect Addressing Mode
• Direct Addressing Mode 2.Register Relative Indirect Addressing Mode
• Implied Addressing Mode 3.Base Indexed Addressing Mode
4.Base Relative-Indexed Addressing Mode
1.Immediate Addressing Mode

• In this mode the data is specified in the instruction itself.


• Here the source operand is 8-bit or 16-bit.
• Data is the part of the instruction.

EX., MOV BL, 10H

BL 10H

This instruction will move the data 10H into BL register immediately.
2. Register Addressing Mode

• In this mode the data (operand) is specified using registers.

EX., MOV BX, CX

BX CX

This instruction will move the content of CX register into BX register.


3. Direct Memory Addressing Mode

• In this mode the address of the data is directly specified in the instruction.

EX., MOV BL,[4143H] MOV BX, [4143H]

BL [4143H]

This instruction will move the data from the location 4143H in DS into CL.
4. Implied Addressing Mode
• In this mode the operands are implied and not specified in the
instruction.
• We do not give any data in instruction.

EX., STC- set the carry flag in 1


CLC-clear the carry flag in 0
STD-set the direction flag in 1
CLD-clear the direction flag in 1
etc.
5. Indirect Addressing Mode
1.Register Indirect Addressing Mode

• In this mode effective address of the memory can be taken from one
of the Base register or index register specified in the instruction.

EX., MOV CX,[BX]

CL [BX]
CH [BX+1]

We have to copy the content from the locations in BX To CL and next


to CH because it is 2byte data.

P.A=DS*10H+[BX]
2.Register Relative Indirect Addressing Mode

• In this the effective address of the data is specified by the sum of contents of
BX/BP register.

EX., MOV[BX+ 10],CL

It moves a word from the address specified by BX+10 in Data segment to DX.

P.A=DS*10H+[BX+10]
3. Base Indexed Addressing Mode

• In this the effective address of the data is computed by adding the Base
register to the contents of the given index register.

EX., MOV CL, [BX+SI]

CL DS:[BX+SI]

It moves The data from the address specified by the BX+SI in DS to the CL
register.
4. Relative Base Indexed Addressing Mode

• In this mode the address of the data is computed as the sum of base registers ,
index register and 8-bit or 16-bit displacement.

EX., MOV CL, [BX+SI+10H]

CL DS:[BX+SI+10H]

It moves The data from the address specified by the BX+SI+10H in DS to the CL
register.
Assembler Directives:-

The assembler directives are the special instructions used to indicate the
assembler how a program is to be assembled and executed in a proper way.

Ex., ASSUME,DB,DW,DD,DQ,DT,EQU,ORG,PROC,END,ENDP,ENDS,EXTRN.

• ASSUME:-
ASSUME directive assigns a logical segment to a physical segment at any
given time.

• .CODE:-
shortcut in definition if the code segment.

• .DATA:-
shortcut in definition of the data segment.
Thanks!

You might also like