求汇编注释

来源:百度知道 编辑:UC知道 时间:2024/05/29 12:27:42
.model small
.386
.code
MAIN PROC FAR
start:
push ds
push ax
sub ax,ax
input:
mov ah,07H
int 21H
cmpe:
cmp al,20H
JE exit
cmp al,61H
JL input
cmp al,7AH
JG input
print:
sub al,01H
mov dl,al
mov ah,02H
int 21H
add al,01H
mov dl,al
mov ah,02H
int 21H
add al,01H
mov dl,al
mov ah,02H
int 21H
mov dl,0DH ;输出回车
mov ah,02H
int 21H
mov dl,0AH ;输出换行
mov ah,02H
int 21H
jmp input
exit :
ret
MAIN ENDP
END start
谢谢了!

.model small
.386
.code
MAIN PROC FAR
start:
push ds
push ax
sub ax,ax
input:
mov ah,07H
int 21H
cmpe:
cmp al,20H
JE exit ;空格退出
cmp al,61H
JL input
cmp al,7AH
JG input ;接收一个小写字母
print:
sub al,01H
mov dl,al
mov ah,02H
int 21H ;输出它的前一个字母
add al,01H
mov dl,al
mov ah,02H
int 21H ;输出本身
add al,01H
mov dl,al
mov ah,02H
int 21H ;输出它的下一个字母
mov dl,0DH ;输出回车
mov ah,02H
int 21H
mov dl,0AH ;输出换行
mov ah,02H
int 21H
jmp input
exit :
ret
MAIN ENDP
END start