微机原理,键盘输入实现任意两个数相加

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

用汇编语言,从键盘输入任意两个十进制数,实现两个数相加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,'='JZX5PUSHAXINCBXJMPX4X5: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

1 / 2
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功