汇编:动态画出一棵七彩圣诞树
来源:互联网 发布:剑三丐姐脸型数据 编辑:程序博客网 时间:2024/05/19 19:43
好久没有写文章了,其实想写的有很多,光是汇编代码就有很多知识点值得记下来,但是蓝癌症犯了,总是拖着,今天先写一点,以后慢慢把东西都写到这来吧。
这是
在寒假写的一个汇编程序代码如下:
assume cs:codedata segment db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789ABCDE'data endscode segment start: mov ax,data mov es,ax mov ax,0b800h mov ds,ax mov cx,25 mov dh,0 mov byte ptr es:[42],24 s: mov si,0 mov dl,0 call show_str call s1 dec byte ptr es:[42] inc dh call delay loop s mov dh,0 mov dl,80 mov byte ptr es:[43],18 mov cx,8 call zuoxie mov cx,6 dec dh add dl,4 call heng inc dh sub dl,4 mov cx,10 call zuoxie mov cx,10 dec dh add dl,4 call heng mov cx,7 s2: inc dh call show_tree call delay loop s2 mov cx,3 call heng mov cx,7 s3: dec dh call show_tree call delay loop s3 mov cx,10 call heng mov cx,10 call youxie mov cx,6 call heng mov cx,7 call youxie mov ax,4c00h int 21h youxie: dec dh sub dl,4 call show_tree call delay inc byte ptr es:[43] loop youxie ret zuoxie: call show_tree call delay inc dh inc byte ptr es:[43] sub dl,4 loop zuoxie ret heng: add dl,4 call show_tree call delay inc byte ptr es:[43] loop heng ret show_tree: mov al,160 mul dh push dx mov dh,0 add ax,dx pop dx mov bx,ax ;bx存放地址 change1: mov byte ptr [bx],1 mov al,es:[43] mov byte ptr [bx+1],al ret s1: push dx mov dh,es:[42] mov dl,4 mov si,1 call show_str pop dx ret show_str: mov al,160 mul dh push dx mov dh,0 add ax,dx pop dx mov bx,ax ;bx存放地址 push cx mov cx,20 change: mov al,es:[si] mov [bx],al mov byte ptr [bx+1],2 add si,2 add bx,8 loop change pop cx ret delay: push cx mov cx,0ffh fir: mov ax,0ffh rep10: dec ax cmp ax,0h jne rep10 loop fir pop cx retcode endsend start
没写注释,凑合看吧,如果有问题,欢迎在下边评论
0 0
- 汇编:动态画出一棵七彩圣诞树
- 【JZOJ】4211 送你一棵圣诞树
- 送你一颗圣诞树
- 圣诞树
- 圣诞树
- 圣诞树
- 圣诞树
- achartengine画出动态折线图
- achartengine画出动态折线图
- achartengine画出动态折线图
- achartengine画出动态折线图
- 利用canvas画出动态时钟
- 从零开始-边学边做-塔防游戏-七彩三国(一)--前言
- 圣诞节来了,打印一颗圣诞树送给程序员
- 【2015.9.6】JZOJ4211送你一颗圣诞树
- 【五校联考1day2】送你一颗圣诞树
- 【五校联考1day2】送你一颗圣诞树
- 画出一个棵树
- Java实现插入排序
- Linux vim使用教程
- 创建China Azure只读用户
- android 快捷方式
- ElasticSearch——跨域访问
- 汇编:动态画出一棵七彩圣诞树
- Another unnamed CacheManager already exists in the same VM.解决方法
- iOS 查找子视图
- jquery checked 操作多选
- Android 网络框架Volley源码讲解
- xUtils框架
- Sping基础
- java 常用方法记录
- hdu 2586 How far away ? lca求最短路