0% found this document useful (0 votes)
616 views6 pages

8086 Addressing Mode - Final

The document discusses different addressing modes in x86 assembly language. There are 8 addressing modes for sequential instructions that access operands from registers, memory, or as immediates. Memory addressing requires calculating a physical address from the segment and offset. Control transfer instructions use intersegment or intrasegment addressing. Register addressing directly uses source and destination registers, while immediate addressing embeds the data in the instruction.

Uploaded by

suhsilanirala
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
616 views6 pages

8086 Addressing Mode - Final

The document discusses different addressing modes in x86 assembly language. There are 8 addressing modes for sequential instructions that access operands from registers, memory, or as immediates. Memory addressing requires calculating a physical address from the segment and offset. Control transfer instructions use intersegment or intrasegment addressing. Register addressing directly uses source and destination registers, while immediate addressing embeds the data in the instruction.

Uploaded by

suhsilanirala
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Sushila soni Lecturer ET & T

Addressing Mode:
Operand may accessible from Accumulator, GRP, and Memory hence
Where is operand available?
How to access it, by instruction? Determine through addressing mode. Instruction is of two type
1. sequential control instructions (data transfer ,arithmetic, logical, processer control)
2. Control transfer instruction (Branch ,CALL, RET, JUMP)
Hence as according to instruction addressing mode is of two types
For sequential control transfer there are 8 addressing mode

1. Register addressing mode


2. Immediate addressing mode
Following 6 are used to access operand from memory

Note: for the memory addressing mode has to calculate PHYSICAL address because memory is
of 20 bit where physical addressed= segment adds*10H+offset add,
|
Where element of offset address are
a. Displacement: it is 8 /16 bit immediate value given in instruction
b. Base: it is the content of the base register, BX or BP
c. Index: it is the content of the Index register, SI or DI

3. Direct addressing mode or Displacement only addressing mode.


4. Register Indirect addressing mode
5. Based addressing mode
6. Index addressing mode
7. Based Index addressing mode
8. Based Index with displacement addressing mode (or relative based index addressing mode)

For control transfer instruction

1. Inter segment addressing mode


a. Direct inter segment addressing mode
b. Indirect inter segment addressing mode
2. Intra segment addressing mode
a. Direct intra segment addressing mode
b. Indirect intra segment addressing mode

Register addressing mode


Instruction: mov destination, source
MOV ax, bx; Copies the value from BX into AX
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 DH, cl; Copies the value from CL into DH

KITE Page 1
Sushila soni Lecturer ET & T

MOV ax, ax; Yes, this is legal!


MOV ax, cs; segment register can also used for data transfer
MOV ds, ax

NOTE: there are two limitations to use segment register in mov instruction

a. CS cannot use as destination operand.


b. Only one of the operands can be a segment register.

Immediate Addressing mode


In this addressing mode immediate data (8bit /16 bit) is the part of the instruction.
MOV AX, 0050H
MOV AL, 23H
MOV [Offset address], Data
MOV [0400H], 5238H; this instruction will move 38H into 0400H and 52H into 0401H

Direct addressing mode or Displacement only addressing mode.


In this addressing mode offset address is given in instruction directly.

1. MOV AL, [8088H]; move the content of 8088h offset address into AL register
2. MOV [1234H], DL: move the content of DL into 1234h
3. MOV AX, [1234H]; move the content 1234h into AL and content of 1235h into AH register.

Default segment register for this addressing mode is “DS”

Register indirect addressing mode

In this addressing mode you can access memory indirectly through the register

MOV AL, [BX] MOV AL, [SI]


MOV AL, [BP] MOV AL, [DI]
[BX], [SI], [DI] addressing mode use DS as a default segment register, and [BP] use SS as a default
segment register, if programmer want to use another segment register then it is possible through segment
override prefix symbol, as given below they both work identically.
MOV AL, CS: [BX] MOV AL, SS: [SI]
MOV AL, DS: [BP] MOV AL, ES: [BI]

KITE Page 2
Sushila soni Lecturer ET & T

KITE Page 3
Sushila soni Lecturer ET & T

Base addressing mode


In this mode, offset address is the sum of the content of base register (BX/BP) and 8/16 bit displacement
(offset address= [BX/BP + 8/16 bit displacement])

MOV AL, disp [BX], if BX = 1000h, and MOV AL, 20[BX], then AL load from DS: 1020h
MOV AL, disp [BP], if BP = 2020h, and MOV AL, 1000[BP], then AL load from SS: 3020h

Default segment register for BX is “DS”, and for BP “SS”, and if you want to change default segment
then it is possible through segment override prefix symbol. Likewise
MOV AL, SS: disp [BX]
MOV AL, DS: disp [BP]

Index addressing mode:


In this mode, offset address is the sum of the content of index register (SI/DI) and 8/16 bit displacement
(offset address= [SI/DI + 8/16 bit displacement])

MOV AL, disp [SI]


MOV AL, disp [DI]

Default segment register is “DS”

Based Index addressing mode:


In this addressing mode offset address is the sum of Base register (BX/BP) and index register (SI/DI)
MOV AL, [BX][SI] MOV AL, [BX][DI]
MOV AL, [BP][SI] MOV AL, [BP][DI]
If BX = 1000h, Si = 800h then AL load from location DS:1800h
Default segment register for [BX], [Si], [DI] is “DS” and for [BP] “SS”

KITE Page 4
Sushila soni Lecturer ET & T

Based Index with displacement addressing mode


In this addressing mode offset address is the sum of base register, index register, 8/16 bit displacement

MOV AL, disp [BX + SI] MOV AL, disp [BP + SI]
MOV AL, disp [BX + DI] MOV AL, disp [BP + SI]

Addressing mode for control transfer instruction:


Inter segment addressing mode:
If the address where the control is to be transfer lies in different segment rather than current one, the
mode is called intersegment address.
Intersegment direct addressing mode:
In this addressing mode where the control is to be transfer given directly, hence CS and IP of destination
address are specified directly.
JMP 5000H: 2000H; jump to offset address 2000h in segment 5000h.
Intersegment direct addressing mode:

KITE Page 5
Sushila soni Lecturer ET & T

KITE Page 6

You might also like