计算Z=5X+3Y+10输出结果
DATA SEGMENT
X DB 15
Y DW 20
Z DW ?
DATA ENDS
STACK SEGMENT STACK
DB 150 DUP(0)
STACK ENDS
CODE SEGMENT
ASSUME CS: CODE, DS: DATA ,SS: STACK
START:PUSH DS
MOV AX,0
PUSH AX
;
MOV AX,DATA
MOV DS,AX
;
MOV AL,5
MUL X
MOV BX,AX
MOV AL,3
MUL Y
ADD AX,BX
ADD AX,10
MOV Z,AX
MOV AX, Z
MOV BL,100
DIV BL
MOV DL,AL
MOV BL,AH
ADD DL,30H
MOV AH,02H
INT 21H
MOV AL,AH
AAM
MOV DL,AH
ADD DL,30H
MOV AH,02H
INT 21H
MOV DL,AL
ADD DL,30H
MOV AH,02H
INT 21H
MOV AH,4CH
INT 21H
CODE ENDS
END START
DATA SEGMENT
X DB 15
Y DW 20
Z DW ?
DATA ENDS
STACK SEGMENT STACK
DB 150 DUP(0)
STACK ENDS
CODE SEGMENT
ASSUME CS: CODE, DS: DATA ,SS: STACK
START:PUSH DS
MOV AX,0
PUSH AX
;
MOV AX,DATA
MOV DS,AX
;
MOV AL,5
MUL X
MOV BX,AX
MOV AL,3
MUL Y
ADD AX,BX
ADD AX,10
MOV Z,AX
MOV AX, Z
MOV BL,100
DIV BL
MOV DL,AL
MOV BL,AH
ADD DL,30H
MOV AH,02H
INT 21H
MOV AL,AH
AAM
MOV DL,AH
ADD DL,30H
MOV AH,02H
INT 21H
MOV DL,AL
ADD DL,30H
MOV AH,02H
INT 21H
MOV AH,4CH
INT 21H
CODE ENDS
END START