资源描述:
《汇编语言字符串动画显示》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、(汇编语言)字符串动画显示悬赏分:10-解决时间:2010-1-319:10字符串动画显示设计内容要求:1、菜单内容包括:①输入字符串;②字符串动画显示;③退出。2、输入字符串选择该项后,可以输入一个字符串。该字符串即为动画显示时所显示的字符串。3、字符串动画显示所显示字符串从无到有,从中间向两边伸展,直至出来完整的字符串。当按下R键后重复移动的动作,直到按下Q键,停止字符串动画显示返回到主菜单。4、在主菜单中选择退出项,则结束程序返回DOS。提问者:debugasm-一级最佳答案DATASEGMENTTOPDB5DUP(0AH)DB31DUP(''),'MAINMENU',
2、0DH,0AHDB25DUP(''),201,21DUP(205),187,0DH,0AHDB25DUP(''),186,'1.INPUTTHESTRING',186,0DH,0AHDB25DUP(''),186,'2.DISPLAYMODELONE',186,0DH,0AHDB25DUP(''),186,'3.DISPLAYMODELTWO',186,0DH,0AHDB25DUP(''),186,'4.RETURNDOS',186,0DH,0AHDB25DUP(''),200,21DUP(205),188,0DH,0AHDB28DUP(''),'CHOCICE(1,2,3,
3、4):$'ENDMESGDB5DUP(0AH),'Pleasestrikeanykey$'LINEEQU2COLOREQU5FHLINE1DB201,56DUP(205),187LINE2DB186,56DUP(''),186LINE3DB200,56DUP(205),188LLEQU$-LINE3XXEQU(80-LL)/2KGDB60DUP('')LINE4DB''LEQU$-LINE4KKDB60DUP('')IEQUXX+1JEQUI+L-1LORGDB0COUNTDW0DATAENDSSTACKSEGMENTPARASTACK'STACK'MESGDB10DUP(?
4、)STACKENDSCODESEGMENTASSUMECS:CODE,DS:DATA,ES:DATA,SS:STACKBEG:MOVAX,DATAMOVDS,AXMOVES,AXAGAIN:MOVAX,3INT10HMOVAH,9LEADX,TOPINT21HMOVAH,1INT21HCMPAL,'1'JNENEXT1JMPS1NEXT1:CMPAL,'2'JNENEXT2JMPS2NEXT2:CMPAL,'3'JNENEXT3JMPS3NEXT3:CMPAL,'4'JNEAGAINJMPTCMOVAL,4CHINT21HS2:MOVAX,3DISPLINE+0,XX,LL,
5、COLOR,0,LINE1DISPLINE+1,XX,LL,COLOR,0,LINE2DISPLINE+2,XX,LL,COLOR,0,LINE3MOVAH,09HLEADX,ENDMESGINT21HMOVAH,1INT16HJNZAGAINMOVCOUNT,0SS2:INCCOUNTMOVCX,COUNTMOVAX,OFFSETKG+2ADDAL,KG+1ADCAH,0SUBAX,COUNTMOVTEMP,AXDISPLINE+1,I,CX,COLOR,1,TEMPCALLDELAYCMPCX,ALJNESS2JMPS2S1:MOVAX,3INT10HMOVAH,0AHL
6、EADX,MESGINT21HJMPAGAINS3:MOVAH,3INT10HDISPLINE+0,XX,LL,COLOR,0,LINE1DISPLINE+1,XX,LL,COLOR,0,LINE2DISPLINE+2,XX,LL,COLOR,0,LINE3MOVCOUNT,0SS3:INCCOUNTMOVCX,COUNTMOVBP,OFFSETLINE4+LSUBBP,CXDISPLINE+1,I,CX,COLOR,1,BPCALLDELAYCMPCOUNT,LL-1JNESS3MOVAH,09HLEADX,ENDMESGINT21HMOVAH,1INT16HJNZTCJM
7、PSSS3SSS3:MOVAH,3INT10HDISPLINE+0,XX,LL,COLOR,0,LINE1DISPLINE+1,XX,LL,COLOR,0,LINE2DISPLINE+2,XX,LL,COLOR,0,LINE3S4:DISPLINE+1,I,CX,COLOR,0,LINE4DECCOUNTMOVCX,COUNTCALLDELAYCMPCOUNT,LJNES4JMPS3DELAYPROCPUSHCXPUSHDXMOVDX,10000D1:MOVCX,6801D2:LOOPD2DECDXJN