DATA SEGMENT
X DW 20H
Y DW 12H
Z DW ?
DATA ENDS
STACK1 SEGMENT PARA STACK
DB 10H DUP(0)
STACK1 ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
MOV AX,X
ADD AX,Y
SAL AX,1
MOV BX,AX
MOV CL,2
SAL AX,CL
ADD AX,BX
MOV Z,AX
MOV AH,4CH
INT 21H
CODE ENDS
END START
X DW 20H
Y DW 12H
Z DW ?
DATA ENDS
STACK1 SEGMENT PARA STACK
DB 10H DUP(0)
STACK1 ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
MOV AX,X
ADD AX,Y
SAL AX,1
MOV BX,AX
MOV CL,2
SAL AX,CL
ADD AX,BX
MOV Z,AX
MOV AH,4CH
INT 21H
CODE ENDS
END START