【正文】
1 摘 要 本次課程設(shè)計(jì)是通過編寫匯編語言程序,實(shí)現(xiàn)字符圖形的顯示,我們這組是每人用匯編語言程 序?qū)崿F(xiàn)不同的字符顯示,我的是顯示字符 —— 安全。具體實(shí)現(xiàn)方法可以在 DOS環(huán)境下完成。編寫完程序后分析并理解每條程序的意思,并解釋主要程序的意思,最后調(diào)試出所要求的字符。在程序編 寫前,我首先對(duì)自己顯示的圖形進(jìn)行了設(shè)計(jì),確定了每個(gè)數(shù)字相對(duì)于前一個(gè)數(shù)字的位置,以便在編寫程序的時(shí)候正確定義字符的屬性,也為在顯示的時(shí)候能夠顯示較好的效果,打下了基礎(chǔ)。本次實(shí)驗(yàn)實(shí)驗(yàn)的編寫環(huán)境是 MASM,編譯、鏈接也是在該環(huán)境下實(shí)現(xiàn)的。程序的運(yùn)行 我使用的是 DOS 環(huán) 境。通過參考網(wǎng)上的一些原程序,我發(fā)現(xiàn)要編寫好該程序,首先應(yīng)該對(duì) BIOS的中斷 10熟悉,因此 程序編寫前,我先認(rèn)真學(xué)習(xí)了該 BIOS 中斷的有關(guān)功能。萬事開頭難,一旦了解了設(shè)計(jì)此程序的原 理,并在此基礎(chǔ)上掌握相關(guān)的技術(shù),其他的工作也就跟著展開來。 本次課程設(shè)計(jì),是使用匯編作為開發(fā)語言實(shí)現(xiàn)功能要求。總所周知,匯編是一個(gè)低級(jí)語言,對(duì)硬件有很大的依賴性,在使用上也不及高級(jí)語言方便,但其在執(zhí)行效率上比高級(jí)語言有很大的優(yōu)勢(shì)。本次課程設(shè)計(jì),一方面讓我們?cè)俅问煜R編指令,再次對(duì)算法的設(shè)計(jì)有一定的要求。另一方面讓 我們對(duì)較大匯編程序的編寫有一個(gè)清晰的過程,學(xué)習(xí)把一個(gè)教大問題分解成若干個(gè)小問題,即子程序是一個(gè)良好的編程習(xí)慣。掌握匯編指令,學(xué)習(xí)的理論知識(shí)應(yīng)用于解決實(shí)際的問題。 關(guān)鍵詞 : 推箱子,休閑娛樂,拓展思維 2 Abstract This course is designed by write assembly language program to realize the character graphic display, each of our group is in assembly language program to realize the different characters, according to my is the character security. Concrete implementation method can be done in the DOS environment. After writing the program analysis and understand the meaning of each program, and explain the meaning of the main program, the final debugging the required characters. Before I write, I first has carried on the design to their own display graphics, identified before every number relative to the position of a number, so that at the time of write programs correctly define the character attributes, also for the display of time can show good effect, laid the foundation. This experiment experimental writing environment is MASM, pile, link, also is in the ? The curriculum design, assembly as a development language realization is the use of functional requirements. Known, the assembly is a lowlevel language, have great dependence on hardware, also as a highlevel language in use is convenient, but its on the execution efficiency than a highlevel language has a great advantage. The curriculum design, on the one hand, let us be familiar with assembly instruction again and again to the design of algorithm has certain requirements. On the other hand let us on large assembler. Write a clear, the process of learning a teaching big problem is deposed into several small problems, namely the subroutine is a good programming habits. Master the assembly instruction, learning theoretical knowledge is applied to solve the actual problem. Key words: Sokoban game, recreation, creative thinking 3 目 錄 摘 要 ......................................................... 1 緒論 ......................................................... 4 課題研究背景和 意義 ...................................... 4 推箱子游戲發(fā)展現(xiàn)狀 ...................................... 4 設(shè)計(jì)方案 ................................................ 5 程序設(shè)計(jì)說明及代碼 ........................................... 7 初始化模塊 .............................................. 7 功能控制模塊(功能實(shí)現(xiàn)) ............................... 12 游戲數(shù)據(jù)模塊 ........................................... 16 游戲設(shè)計(jì)模塊 ........................................... 18 . 數(shù)據(jù)類的設(shè)計(jì)與實(shí)現(xiàn) .............................. 18 設(shè)定數(shù)據(jù)結(jié)構(gòu) ..................................... 18 游戲數(shù)據(jù)流程和設(shè)計(jì)方案 ...................................... 20 數(shù)據(jù)流程和功能介紹 ..................................... 20 設(shè)計(jì)目的 ............................................... 20 主流程界面設(shè)計(jì) ......................................... 20 游戲設(shè)計(jì)任務(wù)和功能 ..................................... 21 ﹑記錄 ............................................... 24 5.總結(jié) ........................................................ 2