资源描述:
《南邮 微机原理 微型计算机与接口技术 微机原理实验.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、;FILEMENT:EXA131.ASM.486DATASEGMENTUSE16SUMDB?,?MESGDB'25+9='DB0,0N1DB9,0F0HN2DW25DATAENDSCODESEGMENTUSE16ASSUMECS:CODE,DS:DATABEG:MOVAX,DATAMOVDS,AXMOVBX,OFFSETSUMMOVAH,N1MOVAL,BYTEPTRN2ADDAH,ALMOV[BX],AHCALLCHANGMOVAH,9MOVDX,OFFSETMESGINT21HMOVAH,4CHINT21HCHANGPROCLAST:CMPBYTEPTR[BX
2、],10JCNEXTSUBBYTEPTR[BX],10INCBYTEPTR[BX+7]JMPLASTNEXT:MOVDX,wordptrSUMADD[BX+8],DXADDBYTEPTR[BX+7],30HADDBYTEPTR[BX+8],30HRETCHANGENDPCODEENDSENDBEG1.1程序修改;FILENAME:EXA131.ASM.486DATASEGMENTUSE16SUMDB?,?MESGDB'25+9='DB0,0,'$'N1DB9,0F0HN2db25dataENDSCODESEGMENTUSE16ASSUMECS:CODE,DS:DA
3、TABEG:MOVAX,DATAMOVDS,AXMOVBX,OFFSETSUMMOVAH,N1MOVAL,N2ADDAH,ALMOV[BX],AHCALLCHANGMOVAH,9MOVDX,OFFSETmesgINT21HMOVAH,4CHINT21HchangPROCLAST:CMPbyteptr[BX],10JCNEXTSUBbyteptr[BX],10INCbyteptr[BX+7]JMPLASTNEXT:movdx,wordptrsumADD[BX+8],dxADDbyteptr[BX+7],30HADDbyteptr[BX+8],30Hretchange
4、ndpCODEENDSENDBEG2.1学生成绩;FILENAMEEXA241.ASM.486DATASEGMENTUSE16NEQU10SCOREDB43,51,61,71,75,82,86,92,99,100S5DB0S6DB0S7DB0S8DB0S9DB0S10DB0MESG1DB'S5(0-59):','$'MESG2DB'S6(60-69):','$'MESG3DB'S7(70-79):','$'MESG4DB'S8(80-89):','$'MESG5DB'S9(90-99):','$'MESG6DB'S10(100):','$'DATAENDSCODE
5、SEGMENTUSE16ASSUMECS:CODE,DS:DATABEG:MOVAX,DATAMOVDS,AXMOVAH,00H;MOVAL,3;INT10H;前面三行可以去掉不影响运行MOVCX,NANDCX,00FFHMOVBX,OFFSETSCORECOUNT:CMPBYTEPTR[BX],59JNACOUNT1CMPBYTEPTR[BX],69JNACOUNT2CMPBYTEPTR[BX],79JNACOUNT3CMPBYTEPTR[BX],89JNACOUNT4CMPBYTEPTR[BX],99JNACOUNT5INCS10JMPSHORTNEXTCOU
6、NT1PROCINCS5INCBXJMPSHORTNEXTCOUNT1ENDPCOUNT2PROCINCS6INCBXJMPSHORTNEXTCOUNT2ENDPCOUNT3PROCINCS7INCBXJMPSHORTNEXTCOUNT3ENDPCOUNT4PROCINCS8INCBXJMPSHORTNEXTCOUNT4ENDPCOUNT5PROCINCS9INCBXJMPSHORTNEXTCOUNT5ENDPNEXT:LOOPCOUNTMOVAH,09HMOVDX,OFFSETMESG1INT21HMOVAH,02HMOVDL,30HADDDL,S5INT21H
7、MOVAH,09HLEADX,MESG2INT21HMOVAH,02HMOVDL,30HADDDL,S6INT21HMOVAH,09HLEADX,MESG3INT21HMOVAH,02HMOVDL,30HADDDL,S7INT21HMOVAH,09HLEADX,MESG4INT21HMOVAH,02HMOVDL,30HADDDL,S8INT21HMOVAH,09HLEADX,MESG5INT21HMOVAH,02HMOVDL,30HADDDL,S9INT21HMOVAH,09HLEADX,MESG6INT21HMOVAH,02HMOVDL,30HADDDL,S10
8、INT21