DATA SEGMENT
A DW 0001H,0002H
DATA ENDS
CODE SEGMENT
ASSUME DS:DATA,CS:CODE
START:
MOV AX,DATA
MOV DS,AX
MOV AX,A
ADD AX,A+2
MOV AH,4CH
INT 21H
CODE ENDS
END START
;OUTPUT:->
;
;-r
;AX=0000 BX=0000 CX=0020 DX=0000 SP=0000 BP=0000 SI=0000 DI=0000
;DS=0B98 ES=0B98 SS=0BA8 CS=0BA9 IP=0000 NV UP EI PL NZ NA PO NC
;0BA9:0000 B8A80B MOV AX,0BA8
;-t
;
;AX=0BA8 BX=0000 CX=0020 DX=0000 SP=0000 BP=0000 SI=0000 DI=0000
;DS=0B98 ES=0B98 SS=0BA8 CS=0BA9 IP=0003 NV UP EI PL NZ NA PO NC
;0BA9:0003 8ED8 MOV DS,AX
;-t
;
;AX=0BA8 BX=0000 CX=0020 DX=0000 SP=0000 BP=0000 SI=0000 DI=0000
;DS=0BA8 ES=0B98 SS=0BA8 CS=0BA9 IP=0005 NV UP EI PL NZ NA PO NC
;0BA9:0005 A10000 MOV AX,[0000] DS:0000=0001
;-t
;
;AX=0001 BX=0000 CX=0020 DX=0000 SP=0000 BP=0000 SI=0000 DI=0000
;DS=0BA8 ES=0B98 SS=0BA8 CS=0BA9 IP=0008 NV UP EI PL NZ NA PO NC
;0BA9:0008 03060200 ADD AX,[0002] DS:0002=0002
;-t
;
;AX=0003 BX=0000 CX=0020 DX=0000 SP=0000 BP=0000 SI=0000 DI=0000
;DS=0BA8 ES=0B98 SS=0BA8 CS=0BA9 IP=000C NV UP EI PL NZ NA PE NC
;0BA9:000C B44C MOV AH,4C
;-t
;
;AX=4C03 BX=0000 CX=0020 DX=0000 SP=0000 BP=0000 SI=0000 DI=0000
;DS=0BA8 ES=0B98 SS=0BA8 CS=0BA9 IP=000E NV UP EI PL NZ NA PE NC
;0BA9:000E CD21 INT 21