【正文】
很重要的意義,這也是本課題研究的來源。但是,技術(shù)進步絕不是游戲機風(fēng)行的唯一因素。游戲機帶來了一個全球性的瘋狂癥,其他任何娛樂與之相比都望塵莫及。 如今,游戲機風(fēng)行的程度,是第一臺電子游戲機的研制者諾蘭 ?布什納爾先生始料不及的。 隨著計算機游 戲的發(fā)展,很多編程愛好者基于該游戲的思想開發(fā)了出各種版本、各 種類型的推箱子。游戲場景一般是設(shè)定在空間狹小的倉庫中,要求把箱子擺放到指定位置。掌握匯編指令,學(xué)習(xí)的理論知識應(yīng)用于解決實際的問題。本次課程設(shè)計,一方面讓我們再次熟悉匯編指令,再次對算法的設(shè)計有一定的要求。 本次課程設(shè)計,是使用匯編作為開發(fā)語言實現(xiàn)功能要求。通過參考網(wǎng)上的一些原程序,我發(fā)現(xiàn)要編寫好該程序,首先應(yīng)該對 BIOS的中斷 10熟悉,因此 程序編寫前,我先認(rèn)真學(xué)習(xí)了該 BIOS 中斷的有關(guān)功能。本次實驗實驗的編寫環(huán)境是 MASM,編譯、鏈接也是在該環(huán)境下實現(xiàn)的。編寫完程序后分析并理解每條程序的意思,并解釋主要程序的意思,最后調(diào)試出所要求的字符。 1 摘 要 本次課程設(shè)計是通過編寫匯編語言程序,實現(xiàn)字符圖形的顯示,我們這組是每人用匯編語言程 序?qū)崿F(xiàn)不同的字符顯示,我的是顯示字符 —— 安全。具體實現(xiàn)方法可以在 DOS環(huán)境下完成。在程序編 寫前,我首先對自己顯示的圖形進行了設(shè)計,確定了每個數(shù)字相對于前一個數(shù)字的位置,以便在編寫程序的時候正確定義字符的屬性,也為在顯示的時候能夠顯示較好的效果,打下了基礎(chǔ)。程序的運行 我使用的是 DOS 環(huán) 境。萬事開頭難,一旦了解了設(shè)計此程序的原 理,并在此基礎(chǔ)上掌握相關(guān)的技術(shù),其他的工作也就跟著展開來??偹苤?,匯編是一個低級語言,對硬件有很大的依賴性,在使用上也不及高級語言方便,但其在執(zhí)行效率上比高級語言有很大的優(yōu)勢。另一方面讓 我們對較大匯編程序的編寫有一個清晰的過程,學(xué)習(xí)把一個教大問題分解成若干個小問題,即子程序是一個良好的編程習(xí)慣。 關(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è)計方案 ................................................ 5 程序設(shè)計說明及代碼 ........................................... 7 初始化模塊 .............................................. 7 功能控制模塊(功能實現(xiàn)) ............................... 12 游戲數(shù)據(jù)模塊 ........................................... 16 游戲設(shè)計模塊 ........................................... 18 . 數(shù)據(jù)類的設(shè)計與實現(xiàn) .............................. 18 設(shè)定數(shù)據(jù)結(jié)構(gòu) ..................................... 18 游戲數(shù)據(jù)流程和設(shè)計方案 ...................................... 20 數(shù)據(jù)流程和功能介紹 ..................................... 20 設(shè)計目的 ............................................... 20 主流程界面設(shè)計 .......................