大小写字母换程序

上传人:汽*** 文档编号:511062762 上传时间:2022-12-22 格式:DOC 页数:2 大小:13.01KB
返回 下载 相关 举报
大小写字母换程序_第1页
第1页 / 共2页
大小写字母换程序_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

《大小写字母换程序》由会员分享,可在线阅读,更多相关《大小写字母换程序(2页珍藏版)》请在金锄头文库上搜索。

1、1 设计编写大小写字母转换程序实验,要求:程序有友好的运行界面;接收键盘输入字符,将其中的大小写字母相互转换为,其他非字母符号不变;要求程序有方便的输入输出功能;要求程序能够处理基本的错误信息;data segmentstr db Please enter a sentence $,0ah,0dherror db This is not a letter.,0ah,0dh,$sentence db 10h db ? 10h dup (?)data endscode segment assume cs:code,ds:datastart:mov ax,data mov ds,ax lea dx,

2、str mov ah,9 int 21h mov ah,0ah int 21h lea di,sentence+2 mov cl,sentence+10hlop: mov al,di cmp al,0dh je exit cmp al,41h jb x0 cmp al,5ah jbe x1 cmp al,61h jb x0 cmp al,7ah jbe x2x0: mov dx,offset error mov ah,9 int 21h inc di loop lop jmp exitx1: add al,20 mov di,al inc di loop lop jmp exitx2: sub al,20 mov di,al inc di loop lopexit:mov byte ptr di,$ lea dx,sentence+2 mov ah,9 int 21h mov ah,4ch int 21hcode ends end start

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 机械/制造/汽车 > 综合/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号