程序:
data segment
ERROR db 'PLEASE INPUT AGAIN!$'
GOOD_BYE db 'BYE!$'
data ends
code segment
assume cs:code,ds:data
main:
mov ax,data
mov ds,ax
mov ax,0
TOP:
mov ah,01H
int 21H
TEST al,0DBH
JZ BYE
cmp al,61H
JGE YES
NO:
mov ah,2
mov dl,13
int 21H
lea dx,ERROR
mov ah,09H
int 21H
BYE:
lea dx,GOOD_BYE
mov ah,09H
int 21H
mov ah,4cH
int 21H
YES:
cmp al,7BH
JLE YES_1
jmp NO
YES_1:
sub al,20H
mov dl,al
mov ah,02H
int 21H
jmp TOP
code ends
end main
2021-12-20