练习实训
接受一个小写字母,找出前个字符和后续字符:
data segment
a db '输入一个字符',0dh,0ah,'$'
c db '下一个字符',0dh,0ah,'$'
data ends
cseg segment
assume cs:cseg,ds:data
start:
mov ax,data
mov ds,ax
mov dx,offset a
mov ah,9h
int 21h
mov ah,1
int 21h
mov dl,al
dec dl
mov cx,3
L1:
mov ah,2
int 21h
inc dl
loop L1
exit:
mov ah,4ch
int 21h
cseg ends
end start
输入:d
输出:dcde