Professional Documents
Culture Documents
Microprocessors-1
Microprocessors-1
Microprocessors-1
Microprocessors-1
Operation
BL AL
CL CH
CX AX
BP SP
AX DS
DI SI
SI DI
ES BX
Not allowed
Not allowed
After execution
AX
BX
CX
DX
Microprocessors-1
1234
1234
Operation
2CH BL
M OV AX,44H
0044H AX
M OV SI,0
0000H SI
M OV CH,100
64H CH
M OV SP,3000H
3000H SP
Microprocessors-1
After execution
AX
BX
CX
DX
Microprocessors-1
6291 H
3456H
Microprocessors-1
Microprocessors-1
Operation
The contents of the memory location DS10H+2000H is
copied a byte into CL.
The content of the BX is copied to the memory location whose
address is DS10H+0100H and DS10H+0100H+1
Dr. Nayera Sadek
XX
XX
XX
XX
XX
BD
XX
ED
Content
ED
BD
Operation
The contents of the memory location DS10H+NUMBER is
copied a byte into AL.
The content of the AX is copied to the memory location
whose address is DS10H+THERE and DS10H+THERE+1
Dr. Nayera Sadek
Microprocessors-1
XX
XX
XX
12
Content
12
Operation
The contents of the memory location DS10H+BX and
DS10H+BX+1 are copied as word into CX.
The content of the DL is copied to the memory location whose
address is SS10H+BP.
The content of the BH is copied to the memory location whose
address is DS10H+DI.
MOV [BP],DL
MOV [DI],BH
Microprocessors-1
Memory: DS10+SI=11234
Address
Content
11235
87
11234
56
XXXX
1234
8756
1234
Microprocessors-1
XXXX
2000
Memory: SS10+BP=22000
Address
Content
22001
87
22000
56
8756
2000
Microprocessors-1
Microprocessors-1
Operation
The contents of the memory location DS10H+SI+BX and
DS10H+SI+BX+1 are copied as word into CX.
The content of the DL is copied to the memory location whose
address is SS10H+BP+DI.
Microprocessors-1
Microprocessors-1
Operation
The contents of the memory location DS10H+BX+BETA
and DS10H+BX+BETA+1 are copied as word into CX.
The content of the DL is copied to the memory location whose
address is SS10H+BP+NEWS.
The contents of the memory location DS10H+SI+ARRAY
and DS10H+SI+ARRAY+1 are copied as word into CX.
The content of the DL is copied to the memory location whose
address is DS10H+DI+BETA.
Microprocessors-1
2.9. Base-Relative-Plus-Index
Addressing
It is used to transfer a byte or word between a register and
the memory location addressed by a base register plus an
index register plus a displacement.
An Example: MOV [BX][SI]BETA,AL
This stands for move the content of the register AL to the
memory location whose effective address is the sum of
BETA and the content of SI and the content of BX.
The physical address = DS10H+BX+SI+BETA.
Microprocessors-1
2.9. Base-Relative-Plus-Index
Addressing
Examples
Assembly Language
MOV CX,[BX+SI+BETA]
MOV BETA[BP+DI],DL
Microprocessors-1
Operation
The contents of the memory location DS10H+SI+BX+BETA
and DS10H+SI+BX+BETA+1 are copied as word into CX.
The content of the DL is copied to the memory location whose
address is SS10H+BP+DI+BETA.
2.9. Base-Relative-Plus-Index
Addressing
Example: MOV CX,[BP][DI]BETA
Before executio n
DI
020 0
CX
XXXX
BP
040 0
After execution
DI
020 0
CX
ABF C
BP
040 0
M emo ry: S S 1 0+ BP +DI+ BETA= 200 00 +0 40 0+ 020 0+ 12 34 =2 183 4
Ad dress
C o ntent
2 18 35
AB
2 18 34
FC
Microprocessors-1
Microprocessors-1
Microprocessors-1
Microprocessors-1
Microprocessors-1
Microprocessors-1
Microprocessors-1
Microprocessors-1
Segment Used
CS:BP
SS:SI
DS:BP
ES:BX+12
SS:BX+DI+32
Default Segment
SS:BP
DS:SI
SS:BP
DS:BX+12
DS:BX+DI+32
Microprocessors-1
12
FFFC
34
3FFFE
3FFFD
3FFFC
Microprocessors-1
12
SP= FFFC
34
3FFFE
3FFFD
3FFFC