您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 酒店餐饮 > 微机原理,键盘输入实现任意两个数相加
用汇编语言,从键盘输入任意两个十进制数,实现两个数相加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
本文标题:微机原理,键盘输入实现任意两个数相加
链接地址:https://www.777doc.com/doc-4820102 .html