简单汇编题 谁帮忙做一下
来源:百度知道 编辑:UC知道 时间:2024/05/15 10:14:12
用汇编语言实现“从键盘上输入一个字母,输出它的前一个和后一个字母”
code segment
assume cs:code
start:
mov ah,1
int 21h
mov dl,al
dec dl
mov cx,3
next:
mov ah,2
int 21h
inc dl
loop next
mov ah,1
int 21h
mov ah,4ch
int 21h
code ends
end start
code segment
assume cs:code
start:
mov ah,1h ;用户输入字符
int 21h
inc al ;ascii码加1
mov dl,al ;输出下一个字符
mov ah,2h
int 21h
mov ah,4ch ;返回到系统
int 21h
code ends
end start