资源描述:
《汇编程序设计总结报告.doc》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、汇编程序设计总结报告 本组负责设计一个文本器(EDITOR),我主要编写光标的移动和清除屏幕模块, 实现光标的移动和屏幕的清空。 A.光标移动: (1)该程序从键盘上操作; (2)向上的箭头,表示光标要向上移动; (3)向左的箭头表示光标要向左移动; (4)向下的箭头表示光标要向下移动; (5)向右的箭头表示光标要向右移动; 该模块中,当输入¥时,则退出程序;然后,当以键盘输入箭头时,就进入循环来辨别箭头所实现的光标是向左向右还是向上向下 B.清除屏幕模块 (1)键盘输入
2、前要清除屏幕; (2)使整个屏幕的底色显示蓝色; 光标移动主要使用循环和子程序调用。子程序中都用到了BIOS中断和DOS的功能调用。 这次我们的是一个文本器。在此次的编写过程中,我充分的认识到,实践与理论相结合重要性。以前在学习汇编的过程中,感觉有一些的枯燥,但看这小小的光标在蓝色的屏幕上跳动,不尽的想:原来程序与现实距离是这么近。 1.不足之处:程序编写的有些复杂。在程序的调试和联接过程中,出现了一些错误,但都及时的解决。 2.经验:要加强动手能力,多多的编程,多多的上机。 lxxsegment
3、 adb? han1dw? lxxends prognamsegment mainprocfar assumecs:prognam,ds:lxx start: pushds movax,0 pushax movax,lxx movds,ax callclen repea: movah,07h int21h mova,al cmpa,‘$' jeen cmpal,48h;行减一 jnex1 cally1 j
4、mprepea x1: cmpa,4bh;列减一 jnex2 cally2 jmprepea x2: cmpa,50h;行减一 jnex3 cally3 jmprepea x3: cmpa,4dh;列减一 jnerepea cally4 jmprepea en: ret mainendp ;----------------------------------------------- y1procnear pus
5、hax pushbx pushdx movah,3 int10h movah,2;行减一 decdh int10h popdx popbx popax ret y1endp ;---------------------------------------- y2procnear pushax pushbx pushdx movah,3 int10h movah,2 subdl,2;列减一 int10h
6、 popdx popbx popax ret y2endp ;-------------------------------------- y3procnear pushax pushbx pushdx movah,3 int10h movah,2 incdh;行加一 int10h popdx popbx popax ret y3endp ;---------------------------------------
7、- y4procnear movah,3 int10h movah,2 incdl;列加一 int10h ret y4endp ;---------------------------------------------------- clenprocnear movdh,1 movhan1,25d cle: movah,2h movdl,0 int10h movah,09h moval,'' movbl,90h mo
8、vbh,0h;yanse movcx,80 int10h incdh dechan1 cmphan1,01h jnecle ret clenendp ;