Sie sind auf Seite 1von 14

7.

7 Software Model
8088 microprocessor includes 13 16-bit internal
registers.

The instruction pointer, IP


Four data registers, AX, BX, CX, DX
Two pointer registers, BP, SP
Two index registers, SI, DI
Four segment registers, CS, DS, SS, ES

The status register, SR, with nine of its bits


implemented for status and control flags.
The memory address space is 1 Mbytes and the
I/O address space is 64 Kbytes in length.

7.7 Software Model

6.2 8086 Registers (Data, Segment & Index)

Continue
By default BX, SI and DI registers work with DS
segment register
BP and SP work with SS segment register.
Other general purpose registers cannot form an
effective address.
Also, although BX can form an effective
address, BH and BL cannot.

Addressing Modes
Address

mode describe the types of


operands and the way they are
accessed for executing an
instruction.

Addressing Modes
1.

Immediate
immediate data is a part of instruction,
and appears in the form of successive
byte or bytes.

i.e : MOV AX, 0005H


0005H is the immediate data
(can be 8 bits or 16 bits)

Addressing Modes

2. Direct
a 16 bit memory address (offset) is directly
specified in the instruction as a part of it.

i.e : MOV AX, [5000H]


Here, data resides in a memory location in the
data segment, whose effective address may
be computed using 5000H as the offset
address and content of Data Segment(DS) as
segment address. The effective address here
is 10H*DS+5000H

Addressing Modes

3. Register
the data is stored in a register and it is
referred using the particular register. All the
registers (except IP) may be used in this mode.

i.e : MOV BX,AX

7.10 The Register Indirect Addressing Modes


4.

Register Indirect

the address of the memory (which contains data or operand)


is determined in an indirect way, using the offset registers.

the offset address of data is in either BX or SI or DI register.

the default segment is either DS or ES.

i.e : MOV AX,[BX]

In this example, data is present in a memory location in DS


whose offset address is in BX.

The effective address of the data is given as 10H*DS+[BX]

7.11 The indexed Addressing Modes


5. Indexed
Offset of the operand is stored in one of the index
registers.
DS and ES are the default segments for index
registers SI and DI respectively.

i.e : MOV AX, [SI]


In this example, data is available at an offset
address stored in SI in DS.
In this case, is computed as 10H*DS+[SI]

Addressing Modes
6.

Register Relative

the data is available at an effective address


formed by adding an 8-bit or 16-bit
displacement with the content of any one of
the registers BX, BP, SI and DI in the default
(either DS or ES) segment.

i.e : MOV AX, 50H [BX]

In this example, the effective address is given


as 10H*DS+50H+[BX]

7.12 The Based Indexed Addressing Modes


7. Based Indexed
The effective address of data is formed, by adding
content of a base register (any one of BX or BP) to
the content of an index register (any one of SI or
DI).
The default segment register may be ES or DS.

i.e : MOV AX, [BX] [SI]


In this example, BX is the base register and SI is the
index register.
The effective address is computed as 10H*DS+[BX]+[SI]

7.13 The Based Indexed Plus Displacement Addressing Modes

8. Relative Based Indexed


The effective address is formed by adding 8-bit
or 16-bit displacement with the sum of contents
of any of the base registers (BX or BP) and any
one of the index registers, in a default segment.

i.e : MOV AX, 50H [BX] [SI]


In this example, 50H is an immediate
displacement, BX is a base registers and SI is
an index register. The effective address of data
is computed as 160H*DS+[BX]+[SI]+50H

Example
Compute the physical address
for the specified operand
in each of the following
instruction:
a) MOV AL, BL
b) MOV AX, 0FFA
c) MOV DI,[SI]
d) MOV [BX] + 0400H,CX
e) MOV CX, [SI]+0100
SI = 0400 , DI= 0500
DS = 0200
AX = 2345
BX = 1234
CX=1212
DX= E412

Das könnte Ihnen auch gefallen