资源描述:
《汇编:十进制转化十六进制》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、1.输入两位10进制转换为16进制输出datasegmentdataendscodesegmentassumecs:code,ds:datastart:movax,datamovds,axmoval,0movah,01hint21hmovbh,almovah,01hint21hmovbl,almovax,0subbh,30hmoval,bhmovcl,0ahmulclsubbl,30haddal,blmovdl,almovbl,10hmovcl,almovdl,0l1:cmpcl,bljnael2incd
2、lsubcl,bljmpl1l2:adddl,30hmovah,02hint21hcmpcl,0ahjael3movdl,cladddl,30hmovah,02hint21hjmpel3:movdl,cladddl,37hmovah,02hint21he:movah,4chint21hcodeendsendstart2.10转2datasegmentoutput1db'inputthedecimalnumber:$'output2db'thebinarynumberis:$'dataendscodeseg
3、mentassumecs:code,ds:datamainprocfarstart:movax,datamovds,axmovdx,offsetoutput1movah,09hint21hcallcrlfinput:movah,01hint21hcmpal,30hjbinputcmpal,39hjaeinputmovbl,alleadx,output2movah,09hint21hcallcrlfmovcx,4m1:testbl,8hjnzm2movdl,'0'movah,02hint21hjmpm3m2
4、:movdl,'1'movah,02hint21hm3:shlbx,1loopm1movah,4chint21hretmainendpcrlfprocnearmovdl,0dhmovah,02hint21hmovdl,0ahmovah,02hint21hretcrlfendpcodeendsendstart