| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 5137 人关注过本帖
标题:[转帖]跑动的男孩
只看楼主 加入收藏
zhulei1978
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:53
帖 子:1351
专家分:1200
注 册:2006-12-17
结帖率:100%
收藏
 问题点数:0 回复次数:4 
[转帖]跑动的男孩
程序代码:
data segment
;
;男孩的跑动图形数据
;frame 1 data
;
 boyd db 8 dup(0) ;ascii 80h (upper left)
  db 8 dup(0) ;ascii 81h
  db 0,1,7,31,4 dup(63) ;ascii 82h
  db 120,252,244,240,240,240,176,176 ;ascii 83h
  db 8 dup (0) ;ascii 84h
  db 0,1,3,7,14,14,12,1 ;ascii 85h
  db 31,207,231,247,127,126,254,254 ;ascii 86h
  db 248,184,200,240,128,0,8,120 ;ascii 87h
  db 0,1,3,7,15,14,12,0 ;ascii 88h
  db 7,207,207,223,255,255,239,195 ;ascii 89h
  db 254,254,255,247,227,128,128,128 ;ascii 8ah
  db 120,240,192,128,4 dup(0) ;ascii 8bh
  db 8 dup(0) ;ascii 8ch
  db 3,3,1,1,4 dup(0) ;ascii 8dh
  db 131,135,207,254,252,240,96,0 ;ascii 8eh
  db 8 dup(0) ;ascii 8fh
;
;
;frame 2 data
;
  db 8 dup(0) ;ascii 90h
  db 8 dup(0) ;ascii 91h
  db 5 dup(0),3,15,31 ;ascii 92h
  db 3 dup (0),124,2 dup(254),252,248 ;ascii 93h
  db 8 dup(0) ;ascii 94h
  db 3 dup(0),1,3,7,6,6 ;ascii 95h
  db 63,63,31,159,207,231,255,127 ;ascii 96h
  db 248,248,216,216,252,220,228,248 ;ascii 97h
  db 8 dup(0) ;ascii 98h
  db 6,15,63,127,255,255,127,127 ;ascii 99h
  db 254,3 dup(252),253,223,143,128 ;ascii 9ah
  db 0,0,96,224,224,192,128,0 ;ascii 9bh
  db 0,1,1,5 dup(0) ;ascii 9ch
  db 255,239,207,30,127,255,252,0 ;ascii 9dh
  db 192,192,0,0,128,0,0,0 ;ascii 9eh
  db 8 dup(0) ;ascii 9fh
;
;
;frame 3 data
;
  db 8 dup(0) ;ascii a0h
  db 8 dup(0) ;ascii a1h
  db 0,0,3,7,4 dup(15) ;ascii a2h
  db 0,126,3 dup(255),252,236,236 ;ascii a3h
  db 8 dup(0) ;ascii a4h
  db 7 dup(0),1 ;ascii a5h
  db 15,7,1,1,7,63,255,255 ;ascii a6h
  db 254,238,242,252,224,128,0,0 ;ascii a7h
  db 7 dup(0),1 ;ascii a8h
  db 1,3,7,15,31,63,255,252 ;ascii a9h
  db 255,254,255,255,252,255,255,252 ;ascii aah
  db 0,0,128,128,0,128,0,0 ;ascii abh
  db 3,15,30,30,28,30,30,0 ;ascii ach
  db 192,7 dup(0) ;ascii adh
  db 62,14,6 dup(0) ;ascii aeh
  db 8 dup(0) ;ascii afh
;
;
;frame 4 data
;
  db 8 dup(0) ;ascii b0h
  db 7 dup(0),13 ;ascii b1h
  db 1,7,4 dup(15),7,199 ;ascii b2h
  db 254,255,255,253,252,236,236,254 ;ascii b3h
  db 5 dup(0),63,254,254 ;ascii b4h
  db 31,30,3 dup(0),7,31,63 ;ascii b5h
  db 227,121,63,63,254,3 dup(255) ;ascii b6h
  db 238,242,252,0,3,135,255,252 ;ascii b7h
  db 252,63,63,31,4 dup(0) ;ascii b8h
  db 4 dup(255),4 dup(0) ;ascii b9h
  db 240,224,192,240,248,63,31,15 ;ascii bah
  db 0,0,96,224,224,192,192,128 ;ascii bbh
  db 8 dup(0) ;ascii bch
  db 8 dup(0) ;ascii bdh
  db 6,7 dup(0) ;ascii beh
  db 8 dup(0) ;ascii bfh
;
;
 out_char db 'Author: HSLY',0DH,0AH
  db 'From : China',0dh,0ah
  db 'My Website : http://x86asm.',0dh,0ah
  db 'My E-mail : pliceman_110@',0dh,0ah
  db 'Time : 2002 02-14',0dh,0ah
  db 'Opccupation: Student',0dh,0ah
  db 'Age : 22',0dh,0ah 

 len_str equ $-out_char
  ascii db ?

 frame db ?
data ends

extra segment

 dest_buffer db 40 (?)
extra ends

code segment
main proc far

 assume cs:code,ds:data,es:extra
start:

 push ds

 sub ax,ax

 push ax

 mov ax,data

 mov ds,ax

 mov ax,extra

 mov es,ax


 mov ah,0 

 mov al,4 

 int 10h 


 mov ah,11 

 mov bh,1 

 mov bl,0 

 int 10h
;
 mov ah,11 

 mov bh,0 

 mov bl,1 

 int 10h
;
; 设置中断向量指向跑动男孩的图形数据
;
 mov al,1fh 

 mov dx,offset boyd 

 mov ah,25h 

 int 21h 
;


;把男孩的图形画在显示屏的左上角跑动
frame1: mov ascii,80h 

 mov frame,1
;
startfr: sub dx,dx 
;
drawchar: mov ah,2 ;置光标位置
 mov bh,0

 int 10h
;设置男孩为黄色并在蓝色背景里,并设置了男孩的高度和宽度
 mov ah,9 

 mov cx,1 

 mov bl,03h 

 mov al,ascii

 int 10h
;
 inc ascii 

 inc dl 

 cmp dl,3 

 jna drawchar
;
 mov dl,0 

 inc dh 

 cmp dh,3 

 jna drawchar
;
;重复显示男孩的图形
;
 call delay ;调用跑动子程序
;
 inc frame ;变换男孩显示图形
 cmp frame,4

 jna startfr
;
; 调用校验键盘功能如果按任意键,就重新设置成为80×25的彩色方式并返回DOS和显示我的个人资料!
 mov ah,0bh 

 int 21h 

 cmp al,0ffh 

 jne frame1

 xor dx,dx

 xor bp,bp

 mov ax,03

 int 10h


 mov bp,offset out_char

 mov cx,len_str

 mov dh,0

 mov dl,33

 mov al,1

 mov bl,0eh

 mov ah,13h

 int 10h
;
 mov ax,4c00h

 int 21h 
;
; 
;
delay proc

 push cx

 mov cx,10000
waste: loop waste

 pop cx

 

 ret
delay endp

main endp
code ends

 end start

2016-04-29 16:34
zhulei1978
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:53
帖 子:1351
专家分:1200
注 册:2006-12-17
收藏
得分:0 
图片附件: 游客没有浏览图片的权限,请 登录注册

其实我就是改变社会风气,提高少女素质,刺激电影市道,提高年轻人内涵,玉树临风,风度翩翩的整蛊专家,我名叫古晶,英文名叫JingKoo!
2016-05-03 21:49
wmf2014
Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19
等 级:贵宾
威 望:216
帖 子:2039
专家分:11273
注 册:2014-12-6
收藏
得分:0 
这个运行不出来,黑屏。

能编个毛线衣吗?
2016-05-04 08:50
zhulei1978
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:53
帖 子:1351
专家分:1200
注 册:2006-12-17
收藏
得分:0 
怎么,你装个dosbox

其实我就是改变社会风气,提高少女素质,刺激电影市道,提高年轻人内涵,玉树临风,风度翩翩的整蛊专家,我名叫古晶,英文名叫JingKoo!
2016-05-05 14:57
Alar30
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:10
帖 子:988
专家分:1627
注 册:2009-9-8
收藏
得分:0 
这个不错哈。。
2016-06-15 15:39
快速回复:[转帖]跑动的男孩
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.046553 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved