以下是8位元的加减乘除得运算
如何将它改成16位元的
CLEAR MACRO
MOV AH,6
MOV AL,0
MOV CX,0
MOV DL,79
MOV DH,24
MOV BH,7
INT 10H
ENDM
;
SETCR MACRO X,Y
MOV AH,2
MOV DL,X
MOV DH,Y
MOV BH,0
INT 10H
ENDM
;
PRINT MACRO STRING
MOV DX,OFFSET STRING
MOV AH,9
INT 21H
ENDM
;
INPUT MACRO BUFFER
MOV DX,OFFSET BUFFER
MOV AH,0AH
INT 21H
ENDM
;
PUTC MACRO CHAR
MOV AH,2
MOV DL,CHAR
INT 21H
ENDM
;
.MODEL SMALL
.STACK 100H
.DATA
MSG1 DB 'N1 (0-255):','$'
MSG2 DB 'N2 (0-255):','$'
MSG3 DB 'Operation (+ - * /):','$'
MSG4 DB 0DH,0AH,'Result:','$'
MSG5 DB '....','$'
CR DB 0DH,0AH,'$'
STR1 DB 4,0,4 DUP(0)
STR2 DB 4,0,4 DUP(0)
N1 DB 0
N2 DB 0
HEX DW 0
BCD DB 3 DUP(0)
CONT DW 10
TEMP DB 0
SIGN DB 0
ASC DB '0123456789'
.CODE
START: MOV AX,@DATA
MOV DS,AX
CLEAR
SETCR 0,0
PRINT MSG1
INPUT STR1
MOV BX,OFFSET ..
访客只能看到部份内容,免费 加入会员 或由脸书 Google 可以看到全部内容