资源描述:
《汇编实验一报告》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、汇编语言程序设计实验报告班级:计科1班学号:—姓名:—实验FI期2015.10.17成绩实验一顺序程序设计编写计算表达式(X・(X*Y・128+Z))/V的程序,将商存入U单元,余数存入R单元,并显示U及R。要求X,YZ,V四个变量自己在数据段定义,显示格式如下:Result:U=?R=?程序框图:(手画)程序清单:(要冇注释)DATASEGMENTXDB60YDB3ZDB3VDB5UDB?RDB?STR1DB,Result:U=$,STR2DB,Result:R=$,DATAENDSCODES
2、EGMENTASSUMECS:CODE?DS:DATASTART:MOVAX,DATAMOVDS,AXMOVAL,XIMULYMOVCX,128SUBAX,CXMOVBX,AXMOVAL,ZCWDADDBX,AXMOVAL,XCWDSUBAX,BXIDIVVMOVU,ALMOVR,AHLEADX,STR1MOVAH,9INT21HMOVBL,UMOVCH,2MOVCL,4L2:ROLBL,CLMOVDL,BLANDDL,0FHADDDL,30HCMPDL,3AHJLL1ADDDL,7LI:MOV
3、AH,2INT21HDECCHJNZL2/X*Y/减128/Z扩展/加Z/X扩展/X-(X*Y-128+Z)的结果/除V/商存入U/余数存入R/9号功能显示字符串/与0FH相与/加30H/比较DL与3AH/小于则转至L1/2号功能显示一个字符/CH减1/CH#0转至L2MOVDL,0AHMOVAH,2INT21HMOVDL,0DHMOVAH,2INT21HLEADX,STR2MOVAH,9INT21HMOVBL,RMOVCH,2MOVCL,4L4:ROLBL,CLMOVDL,BLANDDL,0F
4、HADDDL,30HCMPDL,3AHJLL3ADDDL,7L3:MOVAH,2INT21H/换行/回车/BL循环左移4位/与0FH相与/比较DL与3AH/小于则转至L3/CHHO转至L4DECCHJNZL4MOVAH,4CHINT21HCODEENDSENDSTART运行结果:®DOSBox0.74,Cpuspeed:3000cycles,Frameskip0,Program:DEB...O75A:0O3O6907M0018€105A07-FFFFFFFF00000000iZ)••••975A
5、:0O4O05QO000000G1000OO-OO00000000000000>••••975A:0O50CD21>CB0000G100000-0000000000000000I••••975A:00606000000000G>00000-0000000000000000)••••3?5A:e0?060eo000000Go0009-00oeeo0000000000)••••975A:00OOGO0D7373313112E65-78650D0000000000•・syll・exe・.EJ75A:0
6、0900000975A:0OA000GO000000G00GO00G>00000-000000100000-GOGO0000000000-GCS:ZAAX二0002BX-0037CX二0O8ODX^OOOOSP-0000BP-0000SI二0000DI二0000DS=076AES=075ASS=0?69976C:00ZA8D160600LEACS=076CIP=OOZAiDX,[0006]NUUPElPLHZMAPEMCDS:0006=6552八Error-DDS:OO76A:0OOO3C03'
7、930501e«5Z&5-73756C3DZ408826-05008DB409>&….)••••976A:OO50CD21BAIE04G>01)5G2—B1CMD
8、2C38AD380E2♦)••••976A:0060OF80CZ3080FA3A7C-G380CZ07B4QZCD21・..0..:1・・・・)•••T976A:0070FECD75E6B2€*B4GZ-CD21BZODB402CDZ1..u?..i•••Y-aADEBUG下内存查看图®DOSBox0.74,Cpuspeed:3000cycles,Frameskip0fProgram:DEB…Objectfilename[syll.OBJ]:Sourcelisting[NUL.LSTJ:Cros