微机原理汇编语言将小写字母转换为大写实验.docx

上传人:牧羊曲112 文档编号:3513839 上传时间:2023-03-13 格式:DOCX 页数:2 大小:36.58KB
返回 下载 相关 举报
微机原理汇编语言将小写字母转换为大写实验.docx_第1页
第1页 / 共2页
微机原理汇编语言将小写字母转换为大写实验.docx_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

《微机原理汇编语言将小写字母转换为大写实验.docx》由会员分享,可在线阅读,更多相关《微机原理汇编语言将小写字母转换为大写实验.docx(2页珍藏版)》请在三一办公上搜索。

1、微机原理汇编语言将小写字母转换为大写实验键盘输入一段字符串,以回车结束输入,程序将其中小写字母转换为大写 DATAS SEGMENT tishi db please enter a string!,$ outs db the new steing is:,$;此处输入数据段代码 DATAS ENDS STACKS SEGMENT ;此处输入堆栈段代码 STACKS ENDS CODES SEGMENT ASSUME CS:CODES,DS:DATAS,SS:STACKS START: MOV AX,DATAS MOV DS,AX mov dx, offset tishi mov ah,09h

2、int 21h mov dl,0dh mov ah,02h int 21h mov dl,0ah mov ah,02h int 21h mov si, 0 input: mov ah,01h int 21h cmp al,0dh jz enter ;此处判断输入字符是否为回车 cmp al,61h jb load cmp al,7ah ja load sub al,20h load:mov si,al inc si jmp input enter: mov cx,si;若输入字符为回车,则输入结束 mov si,0 mov dl,0dh; mov ah,02h; int 21h; mov dl,0ah; mov ah,02h; int 21h;此处回车换行 mov dx,offset outs;显示提示符 mov ah,09h int 21h mov dl,0dh; mov ah,02h int 21h mov dl,0ah mov ah,02h int 21h;回车换行 shuchu:mov dl,si mov ah,02h int 21h inc si loop shuchu ;输出循环 MOV AH,4CH INT 21H CODES ENDS END START

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号