Professional Documents
Culture Documents
inn Microprocessor
8086/8088
Prof. Fayez F. M. El-Sousy
Department of Electrical Engineering
College of Engineering
Salman bin Abdulaziz University
Al-Kharj, Saudi Arabia
Example:
MOV AX, 2550H ; move 2550H into AX
MOV CX, 625 ; load the decimal value 62525
intointo
CX
MOV BL, 40H ; load 40H into BL
Example:
MOV AX, [BX] ; moves into AX the contentsents ofof
the memory location pointedinted to
by DS:BX, 1000:12344
The physical address is calculated as
1000x10+1234=11234H
The same rules apply when using register SI oror
DIDI.. Example:
; move contents of DS:SI intointo CLCL ;
move contents of AH intoto DS:DIDS:DI
Example:
Assume that DS = 1120, SI = 2498, and AX = 17FE7FE ShowShow
the contents of memory locations after the executioncution ofof
MOV [SI], AX ; move contents of AX into DS:SIDS:SI
Solution:
The contents of AX are moved into memory
locationslocations with logical address DS:SI and DS:SI + 1;
The physical address starts at DS (shifted left)ft) ++ SISI
== 13698. According to the little endian convention,tion,
Low address 13698H contains FE, the low byte,yte,
High address 13699H will contain 17, the highigh bytebyte..
Prof. Fayez F. M. El-Sousy
Register Indirect Addressing Modeode
Example:
Assume that DS = 4500, SS = 2000, BX = 2100, SI = 1486,486,
DIDI == 8500, BP= 7814, and AX = 2512. Show the exact
physisicalcal memory location where AX is stored in each of the
followingollowing.. AllAll values are in hex.
1- MOV [BX+20], AX
2- MOV [SI+10], AX
3- MOV [DI+4], AX
4- MOV [BP+12], AX
Solution:
Physical Address = segment reg. x 10 + (offset reg.) +
displacement
1- DS:BX+20 location 47120 = (12) and 47121 == (25)(25)
2- DS:SI+10 location 46496 = (12) and 46497 == (25(25 ))
3- DS:DI+4 location 4D504 = (12) and 4D505 == (25)(25)
Prof. Fayez F. M. El-Sousy