Professional Documents
Culture Documents
Destination Source
The MOV instruction does not affect the source operand.
MOV AX, 35A0H
AH AL High byte Low byte
35 A0
AX 00110101 10100000
00110101 10100000
Calculate: (c) The physical address (d) The lower range of the code segment
(e) The upper range of the code segment
Solution:
(a) The logical address 24F6:634A
(d) The lower range of the code segment 24F60 (24F610 + 0000)
(e) The upper range of the code segment 34F5F (24F610 + FFFF)
Solution:
The contents of AL are moved to logical address DS:3518 which is
1512:3518.
The physical address: 18638H (151210H + 3518H = 18638H).
That means after the execution of the second instruction, the memory
location with address 18638H will contain the value 99H.
Solution:
The contents of AX are moved into memory locations with logical
address DS:SI and DS:SI + 1
The physical address: DS10H + SI = 13698.
According to the little endian convention
low address 13698H contains FE, the low byte, and
high address 13699H will contain 17, the high byte.
Examples:
MOV CL,[BX][DI]+8 ; PA = DS10H + BX + Dl + 8
The 80x86 CPU allows the program to override the default segment and
use any segment register.
MOV AL,[BX]
; the physical address of the operand to be moved into AL is DS:BX
MOV AL,ES:[BX]
; the address of the operand being moved to AL is ES:BX instead of
DS:BX.
Default Segment
Instruction Instruction
Segment Used
MOV AL,57H
MOV DH,86H
MOV DL,72H
MOV CX,DX
MOV BH,AL
MOV BL,9FH
MOV AH,20H
ADD AX,DX
ADD CX,BX
ADD AX,1F35H
-ve
The data and code are mixed together in the instructions.
Changing in data the code must be searched for every place the
data is included, and the data retyped.
In 80x86 microprocessors, the area of memory set aside for data is called
the data segment.
the data segment uses register DS and an offset value.
Solution:
(a) The physical address 83DAE (7FA20 + 438E)
(b) The lower range of the data segment 7FA20 (7FA20 + 0000)
(c) The upper range of the data segment 8FAlF (7FA20 + FFFF)
(d) The logical address 7FA2:438E
Solution: