一道汇编题,急求解,先谢谢了!
从键盘输入任意一个字符,要求在显示器上显示,并且也要显示其ASCII值.MODEL Small
.STACK 200H
.CODE
MAIN PROC FAR
START:
MOV AH,01H
INT 21H
PUSH AX
MOV DL,'='
MOV AH,02H
INT 21H
POP AX
MOV DL,AL
PUSH AX
MOV CL,4
SHR DL,CL
CALL OUTPUT
POP AX
MOV DL,AL
AND DL,0FH
CALL OUTPUT
MOV DL,'H'
MOV AH,02H
INT 21H
MOV DL,0AH
INT 21H
MOV DL,0DH
INT 21H
JMP START
MAIN ENDP
OUTPUT PROC NEAR
CMP DL,0AH
JB XX1
ADD DL,07H
XX1:ADD DL,30H
MOV AH,02H
INT 21H
RET
OUTPUT ENDP
END START