1、 1 湖南农业大学湖南农业大学东方科技学院东方科技学院课程论文课程论文(设计)(设计) 学 部:理工学部 班 级:08 姓 名:WC 学 号:2008 课程论文(设计)题目:吃豆子程序 课程名称:汇编语言与微机原理 评阅成绩: 评阅意见: 成绩评定教师签名: 日期: 年 月 日 2 目录目录 一、概要及关键词1 二、课程设计题目2 三、设计思想简述2 四、程序流程图3 五、程序源代码4-7 六、程序运行过程8 七、课程设计总结报告.9-10 八、参考文献.10 1 吃豆子程序 学 生:WC 摘 要:本程序通过汇编语言来实现在屏幕上显示多行“豆子” (用“.”表示) ,用 一个“嘴巴” (用字符
2、“C”表示) ,程序运行时,单击空格, “嘴巴”开始从左到右逐行还是 “吃豆子” ,一直到“豆子”被吃完停止或者单击空格暂停。这个程序是在 Windows xp 的平 台上的 MASM5 进行编译的。此程序提供一个可视化游戏界面,通过键盘输入相应的操作后, 便可以执行整个游戏程序。 当再次空格或整局游戏完成后重新开始整个游戏, 也可以通过键 盘输入定义的字符后,退出程序。通过本次汇编程序的设计,使我进一步熟练掌握了汇编程 序中的一些相关命令的使用。 讲书本理论知识在现实中得到实际的应用, 帮助我进一步的了 解汇编语言编程的一些原理 关键词:数据段 中断 子程序 代码段 调用 主程序 Abstr
3、act:Abstract: This assembly language program to achieve through the screen displays multiple lines of “beans“(with “.“ representation), with a “mouth“(with the character “C“ that), the program runs, click the box, “Mouth “line by line starting from left to right or “ Pacman “has always been to “ bea
4、ns “is finished click the box to stop or pause. This program is in the platform Windows xp MASM5 compiled. This program provides a visual game interface, the corresponding operation by keyboard input, then they can execute the game program. When the space or the entire Board again after the game to start the game, you can also define the character keyboard input, exit the program. Through the design of this assembler so I further mastered some of the associated assembler comman