第一范文网 - 专业文章范例文档资料分享平台

微机原理与接口技术李珍香版课后习题4参考答案

来源:用户分享 时间:2025/7/10 19:25:29 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

int 21h code ends end start

从键盘输入一系列字符(以回车符结束),并按字母、数字及其它字符分类计数,最后显示出这三类的计数结果。

参考程序: data segment

s db ? ;统计字符 d db ? ;统计数字 o db ? ;统计其它字符code segment assume cs:code,ds:data start: mov ax,data mov ds,ax lop: mov ah,1 int 21h cmp al,0dh jz disp cmp al,30h jb other cmp al,39h

16 / 18

cmp al,41h jb other cmp al,5ah jbe str cmp al,61h jb other cmp al,7ah jbe str jmp lop other:inc o jmp lop shu: inc d jmp lop str: inc s jmp lop disp: mov dl,0ah mov ah,2 int 21h mov dl,0dh mov ah,2

17 / 18

int 21h mov dl,s or dl,30h mov ah,2 int 21h mov dl,d or dl,30h int 21h mov dl,o or dl,30h int 21h mov ah,4ch int 21h code ends end start

18 / 18

微机原理与接口技术李珍香版课后习题4参考答案.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c2eggw4f7dz0a0pl1szsm0n19a8hrgx00gxq_4.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top