下载此文档

汇编程序.doc


文档分类:汽车/机械/制造 | 页数:约15页 举报非法文档有奖
1/15
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/15 下载此文档
文档列表 文档介绍
,从键盘输入一字符串(字符个数不超过80,用回车符结束),统计其中字母、数字及其它字符的个数,分别存入letter、digit和other三个变量中。;******;//////////////////////////////////////////////////////////////////;程序名:;作者:;完成日期:;程序说明:;//////////////////////////////////////////////////////////////////.;数据段;stringdb'Hello,Everybody!',0dh,0ah,'$';此处添加一些初始化过的变量定义string1db'pleaseinputastring:',0dh,0ah,'$'string2db'numberofletters:',0dh,0ah,'$'string3db'numberofdigits:',0dh,0ah,'$'string4db'numberofothers:',0dh,0ah,'$';;;程序起始点,建立DS、SSleadx,string1movah,09hint21hmovcx,100w1:movah,01hint21hcmpal,0dhjzover2cmpal,30hjbothercmpal,39hjahigher1jmpdigitalhigher1:cmpal,41hjbotherjahigher2jmpletterhigher2:cmpal,61hjbothercmpal,7Ahjaotherjmpletterjmpoverother:incothersjmpoverletter:inclettersjmpoverdigital:incdigitjmpoverjmpoverover:noploopw1over2:callendlineleadx,string2movah,09hint21hxorax,axmoval,letterscalldisplaycallendlineleadx,string3movah,09hint21hxorax,axmoval,digitcalldisplaycallendlineleadx,string4int21hxorax,axmoval,otherscalldisplaymovah,earmovah,02hmovdl,0Ahint21hmovah,02hmovdl,earmovbl,10divblpushaxmovdl,aladddl,30hmovah,02hint21hpopaxmovdl,ahadddl,30hmovah,;程序结束点,,在数据段定义两个长度相等的字符串STRING1和STRING2,从键盘输入一个字符串并存入STRING1,;数据段string3db'pleaseinputastring1:',0dh,0ah,'$'string4db'essful,outputastring2:',0dh,0ah,'$'string1db81db0db81dup(?)string2dbsizeofstring1dup(?).const;;;程序起始点,建立DS、SSleadx,string3movah,09hint21hmovah,0ahmovdx,offsetstring1int21hmovah,2movdl,0ahint21hmovbl,string1+1movbh,0movbyteptr[string1+2+bx],'$'movsi,offsetstring1[2]movdi,offsetstring2next:cmpbyteptr[si],'$'jedonemovax,[si]mov[di],axincsiincdijmpnextdone:movah,09hleadx,string4int21hmovah,09hmovdx,;程序结束点,返回DOSend;//////////////////////////////////////////////////////////////////;程序名:;作者:;完成日期:;程序说明:;//////////////////////////////////////

汇编程序 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数15
  • 收藏数0 收藏
  • 顶次数0
  • 上传人dongmengguoji
  • 文件大小30 KB
  • 时间2020-02-04