欢迎来到天天文库
浏览记录
ID:55705741
大小:14.50 KB
页数:2页
时间:2020-05-25
《微机原理,键盘输入实现任意两个数相加.doc》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、用汇编语言,从键盘输入任意两个十进制数,实现两个数相加DATASSEGMENTXDB100DUP(0)YDB100DUP(0)ZDB100DUP(?),'$'DATASENDSCODESSEGMENTASSUMECS:CODES,DS:DATASSTART:MOVAX,DATASMOVDS,AXMOVBX,0X1:MOVAH,01HINT21HCMPAL,'+'JZX2PUSHAXINCBXJMPX1X2:MOVCX,BXMOVSI,99X3:POPAXMOVX[SI],ALDECSILOOPX3MOVBX,0X4:MOVAH,01HINT21HCMPAL,'='JZX5P
2、USHAXINCBXJMPX4X5:MOVCX,BXMOVSI,99X6:POPAXMOVY[SI],ALDECSILOOPX6CLCPUSHFMOVCX,100MOVSI,99MOVDI,99X7:MOVAL,X[SI]MOVDL,Y[SI]POPFADCAL,DLAAAPUSHFADDAL,30HMOVZ[DI],ALDECSIDECDILOOPX7MOVSI,0X8:CMPZ[SI],30HJNZX9INCSIJMPX8X9:LEADX,Z[SI]MOVAH,09HINT21HMOVAH,4CHINT21HCODESENDSENDSTART
此文档下载收益归作者所有