微机原理课程设计_动画心_汇编课程设计

上传人:第*** 文档编号:34955635 上传时间:2018-03-05 格式:DOC 页数:26 大小:20.95KB
返回 下载 相关 举报
微机原理课程设计_动画心_汇编课程设计_第1页
第1页 / 共26页
微机原理课程设计_动画心_汇编课程设计_第2页
第2页 / 共26页
微机原理课程设计_动画心_汇编课程设计_第3页
第3页 / 共26页
微机原理课程设计_动画心_汇编课程设计_第4页
第4页 / 共26页
微机原理课程设计_动画心_汇编课程设计_第5页
第5页 / 共26页
点击查看更多>>
资源描述

《微机原理课程设计_动画心_汇编课程设计》由会员分享,可在线阅读,更多相关《微机原理课程设计_动画心_汇编课程设计(26页珍藏版)》请在金锄头文库上搜索。

1、微机原理课程设计_动画心_汇编课程设计-课程设计 微机原理课程设计_打字练习_汇编课程设计|精品课 程网站设计| 课程设计网报告 总结心得 可爱小动画 本动画先显示一些提示信息,然后按任意键进入,只见一个方框向中 间由大变小,并留下痕迹,然后出现一个心,按空格重复出现心,按其他 键将重复,按Q键退出程序,。 data segment full db 0 buff1 db Welcome you to run this programme! db db *Please press any key*$ buff2 db My heart beats with yours! db * Please

2、q to quit *$ data ends code segment main proc far assume cs:code,ds:data start: push ds sub ax,ax push ax mov ax,data mov ds,ax mov ah,00 mov al,04 int 10h mov ah,0bh mov bh,00 mov bl,1 int 10h mov ah,0bh mov bh,1 mov bl,2 int 10h mov dx,offset buff1 ;显示提示信息 mov ah,09 int 21h mov ah,08 int 21h call

3、clear ;cls sss:call text ;display the text mov di,2 mov al,1 ;draw the big box mov cx,70 mov dx,20 mov bx,160 call box mov cx,71 mov dx,21 mov bx,158 again: mov al,1 mov di,0 call box call delay mov al,0 mov di,0 call box inc cx inc dx sub bx,2 cmp cx,94 jnz again mov di,0 ;draw the 2nd box mov cx,9

4、5 mov dx,45 mov al,1 mov bx,110 call box mov cx,96 mov dx,46 mov bx,108 again_00: mov al,1 mov di,0 call box call delay call delay mov al,0 mov di,0 call box inc cx inc dx sub bx,2 cmp cx,114 jnz again_00 mov cx,115 ;draw the 3rd box mov dx,65 mov al,1 mov bx,70call box mov cx,116 mov dx,66 mov bx,6

5、8 again_01: mov al,1 mov di,0 call box call delay call delay mov al,0 mov di,0 call box inc cx inc dx sub bx,2 cmp cx,129 jnz again_01 mov di,2 mov al,1 ;draw the small box mov cx,130 mov dx,80 mov bx,40 call box mov di,2 mov al,3 ; 对角线 mov si,0 mov cx,71 mov dx,21 mov bx,59 call xie_line mov cx,171

6、 mov dx,121 mov bx,59 call xie_line mov si,1 mov cx,71 mov dx,179 mov bx,59 call xie_line mov cx,171 mov dx,79 mov bx,59 call xie_line mov cx,150 ;十字线 mov dx,20 mov si,0 mov bx,60 call draw_line mov cx,150mov dx,120 mov bx,60 call draw_line mov cx,70 mov dx,100 mov si,1 mov bx,60 call draw_line mov

7、cx,170 mov dx,100 mov bx,60 call draw_line mov si,1 mov cx,70 mov dx,60 mov bx,60 call mid_line mov cx,170 mov dx,110 mov bx,60 call mid_line mov si,2 mov cx,110 mov dx,20 mov bx,30 call mid_line mov cx,160 mov dx,120 mov bx,30 call mid_line mov si,3 mov cx,70 mov dx,140 mov bx,60 call mid_line mov

8、cx,170 mov dx,90 mov bx,60 call mid_line mov si,4 mov cx,110 mov dx,180 mov bx,30 call mid_line mov cx,160 mov dx,80 mov bx,30 call mid_line mov di,0 mov al,1 ;draw the big box againmov cx,70 mov dx,20 mov bx,160 call box mov di,0 mov al,1 ;draw the small box again mov cx,130 mov dx,80 mov bx,40 cal

9、l box mov di,0 mov cx,95 mov dx,45 mov al,1 mov bx,110 call box mov cx,115 mov dx,65 mov al,1 mov bx,70 call box mov di,1 ;fill call fill call fill_2 call fill_3 mov cx,149 ;bold mov dx,120 mov al,2 mov bx,60 mov si,0 call draw_line mov cx,151 mov dx,120 mov al,2 mov bx,60 mov si,0 call draw_line he

10、art_: ;draw the heart call cls_box call heart mov ah,08 int 21h cmp al,q jz ok cmp al,20h jz heart_ call clear jmp sssok: ret main endp fill proc near ;the procedure of fill mov full,0 mov al,5 mov cx,160 mov dx,121 mov si,0 mov bx,60 fill_Y: push cx push dx push bx call draw_line pop bx pop dx pop

11、cx sub bx,2 inc cx add dx,2 inc full cmp full,30 jne fill_y ret fill endp fill_2 proc near mov full,0 mov al,5 mov cx,140 mov dx,121 mov si,0 mov bx,60 fill_Y1: push cx push dx push bx call draw_line pop bx pop dx pop cxsub bx,2 dec cx add dx,2 inc full cmp full,30 jne fill_y1 ret fill_2 endp fill_3

12、 proc near mov al,1 mov full,0 mov si,0 mov cx,140 mov dx,121 mov bx,60 re_fill: push bx push cx push dx call draw_line pop dx pop cx pop bx inc cx inc full cmp full,9 jne re_fill mov full,0 mov cx,159 mov dx,121 mov bx,60 re_fill2: push bx push cx push dx call draw_line pop dx pop cx pop bx dec cx

13、inc full cmp full,9 jne re_fill2 ret fill_3 endpdraw_Line proc near ;the procedure of draw a line push bx cmp si,0 jz V_line1 add bx,cx H_line: mov ah,0ch int 10h cmp di,0 jz aa0 cmp di,1 jz aa1 call delay aa1: call delay aa0: inc cx cmp cx,bx jne H_line jmp exit_line V_line1: add bx,dx V_line: mov

14、ah,0ch cmp di,0 jz bb0 cmp di,1 jz bb1 call delay bb1: call delay bb0: int 10h inc dx cmp dx,bx jne V_lineexit_line: pop bx ret draw_Line endp xie_line proc near ;the procedure of draw a xie_line add bx,cx cmp si,1 jz xieline_1 xieline_0: mov ah,0ch int 10h inc dx inc cx cmp cx,bx jne xieline_0 jmp

15、exit_xie xieline_1: mov ah,0ch int 10h dec dx inc cx cmp cx,bx jne xieline_1 exit_xie: ret xie_line endp Mid_line proc near ;draw a xie_line add bx,cx cmp si,2 jz midline_2 cmp si,3 jz midline_3 cmp si,4 jz midline_4 midline_1: mov ah,0ch int 10h inc dxadd cx,2 cmp cx,bx jne midline_1 jmp exit_lines m

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 中学教育 > 教学课件 > 初中课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号