您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 市场营销 > 微机四个实验的程序与仿真步骤截图
实验一:顺序程序设计显示一行“Welcome!实验步骤截图Microsoft(R)MacroAssemblerVersion5.00Copyright(C)MicrosoftCorp1981-1985,1987.Allrightsreserved.Sourcefilename[.ASM]:welcomeObjectfilename[welcome.OBJ]:welcomeSourcelisting[NUL.LST]:Cross-reference[NUL.CRF]:50778+450406Bytessymbolspacefree0WarningErrors0SevereErrorsE:\linkMicrosoft(R)OverlayLinkerVersion3.60Copyright(C)MicrosoftCorp1983-1987.Allrightsreserved.ObjectModules[.OBJ]:welcomeRunFile[WELCOME.EXE]:welcomeListFile[NUL.MAP]:Libraries[.LIB]:LINK:warningL4021:nostacksegmentE:\welcomeWelcome源程序一;--------------FILENAME:512.ASMDATASEGMENTMESGDB'Welcome',0DH,0AH,'$'DATAENDS;----------------CODESEGMENTASSUMECS:CODE,DS:DATABEG:MOVAX,DATAMOVDS,AXLAST:MOVAH,9MOVDX,OFFSETMESGINT21HMOVAH,4CHINT21HCODEENDSENDBEG实验二:分支程序设计实验题目:判断5≤X24,X为无符号字节数?若是,显示“VeryGood!”;否则,显示“Error!”。实验步骤截图E:\masmMicrosoft(R)MacroAssemblerVersion5.00Copyright(C)MicrosoftCorp1981-1985,1987.Allrightsreserved.Sourcefilename[.ASM]:panduanObjectfilename[panduan.OBJ]:panduanSourcelisting[NUL.LST]:Cross-reference[NUL.CRF]:50778+450406Bytessymbolspacefree0WarningErrors0SevereErrorsE:\linkMicrosoft(R)OverlayLinkerVersion3.60Copyright(C)MicrosoftCorp1983-1987.Allrightsreserved.ObjectModules[.OBJ]:panduanRunFile[PANDUAN.EXE]:panduanListFile[NUL.MAP]:Libraries[.LIB]:LINK:warningL4021:nostacksegmentE:\panduanVeryGood!E:\源程序二;------FILENAME:552.ASMDATASEGMENTMESG1DB'VeryGood!$'MESG2DB'Error!$'XDB5N1EQU5N2EQU24DATAENDS;-----------------------CODESEGMENTASSUMECS:CODE,DS:DATABEG:MOVAX,DATAMOVDS,AXMOVDX,OFFSETMESG1CMPX,N1JNCNEXTTAB:MOVDX,OFFSETMESG2JMPDISPNEXT:CMPX,N2JCDISPJMPTABDISP:MOVAH,9INT21HMOVAH,4CHINT21HCODEENDSENDBEG实验三:循环程序设计实验题目:编写程序完成求1+2+3+…N的累加和,直到累加和超过1000为止。统计被累加的自然数个数送CN单元,累加和送SUM。(以二进制的形式显示CN)实验步骤截图Microsoft(R)MacroAssemblerVersion5.00Copyright(C)MicrosoftCorp1981-1985,1987.Allrightsreserved.Sourcefilename[.ASM]:3Objectfilename[3.OBJ]:3Sourcelisting[NUL.LST]:Cross-reference[NUL.CRF]:50846+450338Bytessymbolspacefree0WarningErrors0SevereErrorsE:\linkMicrosoft(R)OverlayLinkerVersion3.60Copyright(C)MicrosoftCorp1983-1987.Allrightsreserved.ObjectModules[.OBJ]:3RunFile[3.EXE]:3ListFile[NUL.MAP]:Libraries[.LIB]:LINK:warningL4021:nostacksegmentE:\3CN=0000000000101100E:\源程序三DATASEGMENTSUMDW?CMDB'CN=','$'CNDW?DATAENDSCODESEGMENTASSUMECS:CODE,DS:DATASTART:MOVAX,DATAMOVDS,AXMOVDX,0MOVBX,0MOVAH,9MOVDX,OFFSETCMINT21HLP:INCBXADDDX,BXCMPDX,1000JBELPMOVSUM,DXDECBXMOVCN,BXCALLDISPMOVAH,4CHINT21HDISPPROCMOVCX,16LAST:MOVDL,'0'RCLBX,1JNCNEXTMOVDL,'1'NEXT:MOVAH,2INT21HLOOPLASTRETDISPENDPCODEENDSENDSTART实验四:子程序设计实验题目:设数据段BUF单元开始有几个有符号的单字节数,其中必定有负数,找出负数中的最大值,并送屏幕显示。显示格式为:MIN=-×××××××B。实验步骤截图Microsoft(R)MacroAssemblerVersion5.00Copyright(C)MicrosoftCorp1981-1985,1987.Allrightsreserved.Sourcefilename[.ASM]:5Objectfilename[5.OBJ]:Sourcelisting[NUL.LST]:Cross-reference[NUL.CRF]:50656+450528Bytessymbolspacefree0WarningErrors0SevereErrorsE:\LINKMicrosoft(R)OverlayLinkerVersion3.60Copyright(C)MicrosoftCorp1983-1987.Allrightsreserved.ObjectModules[.OBJ]:5RunFile[5.EXE]:ListFile[NUL.MAP]:Libraries[.LIB]:LINK:warningL4021:nostacksegmentE:\5MIN=-0010111BE:\源程序四;FILENAME:MIN.ASMDATASEGMENTBUFDB54,-45,62,-23,-31,79,84COUNTDW$-BUFMINDB'MIN=-',7DUP(?),'B','$'DATAENDSCODESEGMENTASSUMECS:CODE,DS:DATABEG:MOVAX,DATAMOVDS,AXMOVCX,COUNTXORBX,BXMOVBX,OFFSETBUFLOOP1:CMPBYTEPTR[BX],0JGENEXT1MOVAL,[BX]JMPNEXT2NEXT1:INCBXDECCXJMPLOOP1NEXT2:INCBXLOOP2:CMPBYTEPTR[BX],0JGENEXT3CMP[BX],ALJLENEXT3MOVAL,[BX]NEXT3:INCBXLOOPLOOP2CALLDISPEXIT:MOVAH,4CHINT21HDISPPROCNEGALSALAL,1LEASI,MINMOVCX,7AGAIN:SALAL,1JCPP1MOVBYTEPTR[SI+5],'0'JMPPP2PP1:MOVBYTEPTR[SI+5],'1'PP2:INCSILOOPAGAINMOVAH,9MOVDX,OFFSETMININT21HRETDISPENDPCODEENDSENDBEG
本文标题:微机四个实验的程序与仿真步骤截图
链接地址:https://www.777doc.com/doc-4998480 .html