datareasegmentstring1db'pleaseinputthenumber:',13,10,'$'string2db13,10,'hereis:',13,10,'$'Bufferdb4db?db4dup(?)numberdb?mulfactdb1feidb254dup(?)datareaendscodeareasegmentmainprocfarassumecs:codearea,ds:datareastart:pushdssubax,axpushaxmovax,datareamovds,axleadx,string1movah,09int21hleadx,Buffermovah,0ahint21hcallconvertnummoval,numberleadx,string2movah,09int21hcallinit;moval,Buffer+1;andax,00ffh;movsi,axcalloutputfei;movfei[si+1],24h;leadx,fei;movah,09;int21hretmainendp;=======================================convertnumprocnearpushbxmovsi,Buffer[1]andsi,00ffhmovcx,simovmulfact,1movbx,0Next:moval,Buffer[si+1];cmpal,'0';jsExit;cmpal,'9';jaExitsubal,30handax,000fhmovdl,mulfactmuldladdbx,axmoval,mulfactmovdl,10muldlmovmulfact,axdecsiloopNextmovnumber,blpopbxretconvertnumendp;==================================initprocnearmovcx,alandcx,00ffhandax,00ffhmovsi,1;andsi,00ffhmovfei+1,1movfei+2,1loop1:subcx,2cmpsi,cxjnbexitmovbl,0addbl,fei[si]addbl,fei[si+1]movfei[si+2],blincsijmploop1exit:retinitendp;==================================outputfeiprocnearmovcl,numberandcx,00ffhmovsi,0loop4:cmpsi,cxjzbreakmovax,fei[si+1]andax,00ffhcalloutputincsijmploop4break:retoutputfeiendp;================================outputprocnearpushaxpushbxpushcxpushdxcmpax,100jlg2movbl,100divbladdal,30hmovbh,ahmovdl,almovah,2int21hmoval,bhcbwg2:cmpax,10jlg4movbl,10divblmovbh,ahaddal,30hmovdl,almovah,2int21hmoval,bhcbwg4:addal,30hmovdl,almovah,2int21hmovdl,20hmovah,2int21hpopdxpopcxpopbxpopaxretoutputendpcodeareaendsendstart