匯編語言寫的貪吃蛇小游戲源代碼

匯編語言寫的貪吃蛇小游戲源代碼

ID:47414809

大?。?8.00 KB

頁數(shù):20頁

時(shí)間:2019-06-27

匯編語言寫的貪吃蛇小游戲源代碼_第1頁
匯編語言寫的貪吃蛇小游戲源代碼_第2頁
匯編語言寫的貪吃蛇小游戲源代碼_第3頁
匯編語言寫的貪吃蛇小游戲源代碼_第4頁
匯編語言寫的貪吃蛇小游戲源代碼_第5頁
資源描述:

《匯編語言寫的貪吃蛇小游戲源代碼》由會員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫

1、DATASEGMENTdw0,0snkdb1blkdb32fooddb3tal1db4tal2db2adrsdb5lendb?pstdb?addrsdw?frowdb?fcoldb?hwrtdb?gmovdb'gameoverpressrtorestartpressqtoquit$'score1db'score:$'score2db?score0db1zerodb48writerdb'Developer:Geniusdot$'emaildb'e-mail:geniusdot@gmail.com$'msg1db'Th

2、ewaytoplaythegame:$'waydb'presswtoup,pressstodown,pressatoleft,pressdtoright$'msgdb'Pressanykey(excepta,s,d,w)tostart$'DATAENDSSTACKSEGMENTstackdb200dup(0)STACKENDSCODESEGMENTASSUMECS:CODE,DS:DATA,SS:STACKstart:movax,datamovds,axmovax,0moves,axmovfrow,10movfco

3、l,6movdh,10movdl,26movah,2movbh,0int10hmovah,9leadx,msg1int21hmovdh,11movdl,7movah,2movbh,0int10hmovah,9leadx,wayint21hmovdh,12movdl,20movah,2movbh,0int10hmovah,9leadx,msgint21hmovah,0int16hmovah,6moval,0movch,0movcl,0movdh,24movdl,79movbh,10int10hmovdh,0movdl

4、,0movah,2movbh,0int10hmovah,9leadx,score1int21hmovdl,15movah,2movbh,0int10hmovah,9leadx,writerint21hmovah,9leadx,emailint21hmovscore2,48pushes:[9*4];將原int9入口地址保存popds:[0]pushes:[9*4+2]popds:[2]movwordptres:[9*4],offsetint9;更改中斷向量表moves:[9*4+2],csjmpaawritemacr

5、orow,col,cnt;宏定義用于向當(dāng)前光標(biāo)處輸出字符pushbxpushcxpushdxmovdh,rowmovdl,colmovah,2movbh,0int10hmovah,9movbl,11movcx,1leadi,cnt;50moval,[di]int10hpopdxpopcxpopbxendmreadhmacrorow,col;宏定義用于讀出當(dāng)前光標(biāo)處字符pushdxpushaxpushbxmovdh,rowmovdl,colmovah,2movbh,0int10hmovah,08hint10hmovp

6、st,alpopbxpopaxpopdxendmwnearmacro;宏定義只用在readcg宏中當(dāng)readcg的所有判斷都不成立調(diào)用此宏localwnext1localwnext2localwnext3localwnext4pushdxdecdhreadhdh,dlcmppst,1jnewnext1writedh,dl,tal2jmpwnext4wnext1:incdhdecdlreadhdh,dlcmppst,1jnewnext2writedh,dl,tal2jmpwnext4wnext2:incdhincdl

7、readhdh,dlcmppst,1jnewnext3writedh,dl,tal2jmpwnext4wnext3:decdhincdlreadhdh,dlcmppst,1jnewnext4writedh,dl,tal2wnext4:popdxendmreadcgmacrorow,col;宏定義用于改變判斷出來的字符localtnup,tnup1,tnup2,tnlf,tnlf1,tnlf2,tndn,tndn1,tndn2,tnrt,tnrt1,tnrt2,gooutpushbxpushaxpushdxwrite

8、dh,dl,tal1decrowreadhdh,dlcmppst,4jnetnup1jmptnup2tnup1:jmpnearptrtnuptnup2:writedh,dl,blkincdhincdhreadhdh,dlcmppst,1jnetnupwritedh,dl,tal2jmpnearptrgoouttnup:popdxpushdxdeccolrea

當(dāng)前文檔最多預(yù)覽五頁,下載文檔查看全文

此文檔下載收益歸作者所有

當(dāng)前文檔最多預(yù)覽五頁,下載文檔查看全文
溫馨提示:
1. 部分包含數(shù)學(xué)公式或PPT動畫的文件,查看預(yù)覽時(shí)可能會顯示錯(cuò)亂或異常,文件下載后無此問題,請放心下載。
2. 本文檔由用戶上傳,版權(quán)歸屬用戶,天天文庫負(fù)責(zé)整理代發(fā)布。如果您對本文檔版權(quán)有爭議請及時(shí)聯(lián)系客服。
3. 下載前請仔細(xì)閱讀文檔內(nèi)容,確認(rèn)文檔內(nèi)容符合您的需求后進(jìn)行下載,若出現(xiàn)內(nèi)容與標(biāo)題不符可向本站投訴處理。
4. 下載文檔時(shí)可能由于網(wǎng)絡(luò)波動等原因無法下載或下載錯(cuò)誤,付費(fèi)完成后未能成功下載的用戶請聯(lián)系客服處理。