datasegment
str1db0dh,0ah,'inputerror!$'
str2db0dh,0ah,'inputyourchar:$'
dataends
codesegment
assumecs:code,ds:data
start:
movax,data
movds,ax
leadx,str2;显示输入信息
movah,9
int21h
movah,01h;调用21中断01功能。。输入字符
int21h
cmpal,61h
jbexit
cmpal,7ah
jaexit
subal,32
movdl,al;显示转换后字母
movah,02h
int21h
movah,4ch;返回dos
int21h
exit:
leadx,str1;显示错误信息
movah,9
int21h
movah,4ch;返回dos
int21h
codeends
endstart