ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 本人的处女作:第一个程序

本人的处女作:第一个程序

原创 Linux操作系统 作者:mugen 时间:2019-06-17 14:18:06 0 删除 编辑

今天无意中整理破笔记本电脑,把原来的破笔记本的电脑的硬盘拿下来做活动硬盘。终于找到了这个文件。

写在这里留个纪念把

说明,这个程序就是大家经常在掌上电脑,电子词典上玩的推箱子游戏,我们这个推的是海豚



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;比较箱子的数组是否和目标的数组一致
;;;;;;;;如果一致说明箱子被送到了目的地

ld a,(number)
ld (temp),a
xor a
ld (flag),a
ld ix,boxnow
$_nextbox:
ld a,(temp)
cp 0
jp z,$cp_result
dec a
ld (temp),a

ld iy,aimplace
ld a,(number)
ld (count),a
$_compareaimx:

ld a,(count)
cp 0
jp z,$_cmpnext
dec a
ld (count),a
ld a,(ix)
ld b,a
ld a,(iy)
cp b
jp z,$_compareaimy
inc iy
inc iy
jp $_compareaimx
$_cmpnext:
inc ix
inc ix
jp $_nextbox
$_compareaimy:
inc ix
inc iy
ld a,(ix)
ld b,a
ld a,(iy)
cp b
jp z,$_result
inc iy
dec ix
jp $_compareaimx
$_result:
ld a,(flag)
inc a
ld (flag),a
inc ix
jp $_nextbox

$cp_result:
ld a,(flag)
ld b,a
ld a,(number)
cp b
jp z,$_suceed
jp $_waite_message

$_suceed:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;显示过关画面,并进入下一关
call _clear
call $_drawstar

$_drawstar:

ld hl,(star)
ld a,SHOW_PUT
ld b,6 ;行
ld c,84 ;点
ld d,Video_WriteCharColY
call Video
ld hl,(star)
ld a,SHOW_PUT
ld b,7 ;行
ld c,96 ;点
ld d,Video_WriteCharColY
call Video
ld hl,(star)
ld a,SHOW_PUT
ld b,8 ;行
ld c,108 ;点
ld d,Video_WriteCharColY
call Video
ld hl,(star)
ld a,SHOW_PUT
ld b,9 ;行
ld c,96 ;点
ld d,Video_WriteCharColY
call Video
ld hl,(star)
ld a,SHOW_PUT
ld b,10 ;行
ld c,84 ;点
ld d,Video_WriteCharColY
call Video
ld hl,(star)
ld a,SHOW_PUT
ld b,11 ;行
ld c,72 ;点
ld d,Video_WriteCharColY
call Video

ld hl,(star)
ld a,SHOW_PUT
ld b,12 ;行
ld c,60 ;点
ld d,Video_WriteCharColY
call Video

ld hl,(star)
ld a,SHOW_PUT
ld b,13 ;行
ld c,48 ;点
ld d,Video_WriteCharColY
call Video
ld a,TIMER_USER
ld hl,6
ld d,Equip_SetTimer
call Function
ld d, Group_GetCommand
call Function
cp CMD_TIMER_USER
jp z,$nextge
cp CMD_PENDOWN
jp z,$nextge
ret
$_moveball:
jp $_move
jp $_waite_message
$nextmess:
ld b, a ;b=command
ld d,Equip_CheckSystemKey
call Function
jp z,$exit
cp HK_ESC
jp z,$exit
cp CMD_DOWN1
jp z,$nextge
cp CMD_DOWN10
jp z,$nextshi
cp CMD_UP1
jp z,$lastge
cp CMD_UP10
jp z,$lastshi
cp CMD_NEXT
jp z,$nextge
cp CMD_BACK
jp z,$moveback
cp CMD_RENEW
jp z,start
jp $_waite_message

$moveback:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;在haitunbuf:画海豚

ld a,(bufcount)
cp 0
jp z,$_waite_message
ld a,(bufcount)
dec a
ld (bufcount),a
ld hl,aimplace
ld a,(number)
ld (count),a
$_htbijiaox:
ld a,(count)
cp 0
jp z,$_htnomudi
dec a
ld (count),a
ld a,(hl)
ld b,a
ld a,(haitunh)
cp b
jp z,$_htbijiaoy
inc hl
inc hl
jp $_htbijiaox

$_htbijiaoy:
inc hl
ld a,(hl)
ld b,a
ld a,(haitunl)
cp b
jp z,$_htmudi
inc hl
jp $_htbijiaox

$_htmudi:

call _wight
ld a,(haitunh)
call _decsla
add a,b
ld (clearx),a
call _high
ld a,(haitunl)
call _decsla
add a,b
ld (cleary),a
ld a,(clearx)
add a,10h
ld h,a
ld a,(clearx)
ld b,a
ld a,(cleary)
add a,10h
ld l,a
ld a,(cleary)
ld c,a
ld e,DEST_B
ld hl,DEST_O
ld d, Video_OutShowIcon
ld a,SHOW_PUT
call Video
ld a,(clearx)
add a,10h
ld h,a
ld a,(clearx)
ld b,a
ld a,(cleary)
add a,10h
ld l,a
ld a,(cleary)
ld c,a
ld d,Video_DrawRect
ld a,SHOW_PUT
call Video
jp $_haitun
$_htnomudi:

call _wight
ld a,(haitunh)
call _decsla
add a,b
ld (clearx),a
call _high
ld a,(haitunl)
call _decsla
add a,b
ld (cleary),a
ld a,(clearx)
add a,10h
ld h,a
ld a,(clearx)
ld b,a
ld a,(cleary)
add a,10h
ld l,a
ld a,(cleary)
ld c,a
ld d,Video_ClearSetArea
ld a,SHOW_PUT
call Video
ld a,(clearx)
add a,10h
ld h,a
ld a,(clearx)
ld b,a
ld a,(cleary)
add a,10h
ld l,a
ld a,(cleary)
ld c,a
ld d,Video_DrawRect
ld a,SHOW_PUT
call Video
$_haitun:

ld a,(bufcount)
sla a
ld b,a
ld hl,haitunbuf
ld a,l
add a,b
ld l,a
ld a,h
adc a,0
ld h,a
ld a,(hl)

ld (haitunh),a
inc hl
ld a,(hl)
ld (haitunl),a

call _wight
ld a,(haitunh)
call _decsla
add a,b
ld (clearx),a
call _high
ld a,(haitunl)
call _decsla
add a,b
ld (cleary),a
ld a,(clearx)
ld b,a
ld a,(cleary)
ld c,a
ld e,DOLPHIN_B
ld hl,DOLPHIN_O
ld d, Video_OutShowIcon
ld a,SHOW_PUT
call Video
ld a,(clearx)
add a,10h
ld h,a
ld a,(clearx)
ld b,a
ld a,(cleary)
add a,10h
ld l,a
ld a,(cleary)
ld c,a
ld d,Video_DrawRect
ld a,SHOW_PUT
call Video
;;;;;;;;现在位置的海豚该清掉了, 变成了箱子了
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;虽然变成了箱子,但没有清除

ld a,(bufcount)
sla a
ld b,a

ld hl,boxbuf
ld a,l
add a,b
ld l,a
ld a,h
adc a,0
ld h,a
ld a,(hl)
ld (buffballx),a
inc hl
ld a,(hl)
ld (buffbally),a
;;;;;;;;;;开始比较是否目的地
ld hl,aimplace
ld a,(number)
ld (count),a
$_bijiaox:
ld a,(count)
cp 0
jp z,$_nomudi
dec a
ld (count),a
ld a,(hl)
ld b,a
ld a,(buffballx)
cp b
jp z,$_bijiaoy
inc hl
inc hl
jp $_bijiaox

$_bijiaoy:
inc hl
ld a,(hl)
ld b,a
ld a,(buffbally)
cp b
jp z,$_mudiballin
inc hl
jp $_bijiaox

$_mudiballin:
call _wight
ld a,(buffballx)
call _decsla
add a,b
ld (clearx),a
call _high
ld a,(buffbally)
call _decsla
add a,b
ld (cleary),a
ld a,(clearx)
ld b,a
ld a,(cleary)
ld c,a
ld e,BALLIN_B
ld hl,BALLIN_O
ld d, Video_OutShowIcon
ld a,SHOW_PUT
call Video
ld a,(clearx)
add a,10h
ld h,a
ld a,(clearx)
ld b,a
ld a,(cleary)
add a,10h
ld l,a
ld a,(cleary)
ld c,a
ld d,Video_DrawRect
ld a,SHOW_PUT
call Video
jp $_editbox

$_nomudi:
call _wight
ld a,(buffballx)
call _decsla
add a,b
ld (clearx),a
call _high
ld a,(buffbally)
call _decsla
add a,b
ld (cleary),a
ld a,(clearx)
ld b,a
ld a,(cleary)
ld c,a
ld e,BALL_B
ld hl,BALL_O
ld d, Video_OutShowIcon
ld a,SHOW_PUT
call Video
ld a,(clearx)
add a,10h
ld h,a
ld a,(clearx)
ld b,a
ld a,(cleary)
add a,10h
ld l,a
ld a,(cleary)
ld c,a
ld d,Video_DrawRect
ld a,SHOW_PUT
call Video
jp $_editbox
$_editbox:

ld a,(bufcount)
sla a
ld b,a

ld hl,rectbuf
ld a,l
add a,b
ld l,a
ld a,h
adc a,0
ld h,a
ld a,(hl)
ld (rectx),a
inc hl
ld a,(hl)
ld (recty),a

ld hl,boxnow
$_bjrectx:

ld a,(hl)
ld b,a
ld a,(rectx)
cp b
jp z,$_bjrecty
inc hl
inc hl
jp $_bjrectx
$_bjrecty:
inc hl
ld a,(hl)
ld b,a
ld a,(recty)
cp b
jp z,$_editrectxy
inc hl
jp $_bjrectx
$_editrectxy:
dec hl
ld a,(buffballx)
ld (hl),a
inc hl
ld a,(buffbally)
ld (hl),a
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;请box
;;;;;;;;比较是否目的的,是dest,否空
ld hl,aimplace
ld a,(number)
ld (count),a
$_cmprextx:
ld a,(count)
cp 0
jp z,$_kong
dec a
ld (count),a
ld a,(hl)
ld b,a
ld a,(rectx)
cp b
jp z,$_cmprexty
inc hl
inc hl
jp $_cmprextx
$_cmprexty:
inc hl
ld a,(hl)
ld b,a
ld a,(recty)
cp b
jp z,$_drawdest
inc hl
jp $_cmprextx
$_kong:
call _wight
ld a,(rectx)
call _decsla
add a,b
ld (clearx),a
call _high
ld a,(recty)
call _decsla
add a,b
ld (cleary),a
ld a,(clearx)
add a,10h
ld h,a
ld a,(clearx)
ld b,a
ld a,(cleary)
add a,10h
ld l,a
ld a,(cleary)
ld c,a
ld d,Video_ClearSetArea
ld a,SHOW_PUT
call Video
ld a,(clearx)
add a,10h
ld h,a
ld a,(clearx)
ld b,a
ld a,(cleary)
add a,10h
ld l,a
ld a,(cleary)
ld c,a
ld d,Video_DrawRect
ld a,SHOW_PUT
call Video
jp $_waite_message

$_drawdest:
call _wight
ld a,(rectx)
call _decsla
add a,b
ld (clearx),a
call _high
ld a,(recty)
call _decsla
add a,b
ld (cleary),a
ld a,(clearx)
add a,10h
ld h,a
ld a,(clearx)
ld b,a
ld a,(cleary)
add a,10h
ld l,a
ld a,(cleary)
ld c,a
ld e,DEST_B
ld hl,DEST_O
ld d, Video_OutShowIcon
ld a,SHOW_PUT
call Video
ld a,(clearx)
add a,10h
ld h,a
ld a,(clearx)
ld b,a
ld a,(cleary)
add a,10h
ld l,a
ld a,(cleary)
ld c,a
ld d,Video_DrawRect
ld a,SHOW_PUT
call Video
jp $_waite_message
$nextge:
ld a,(guanshu)
cp 85
jp z,$clear
ld a,(gewei)
cp 9
jp z,$clearge
add a,1
ld (gewei),a
jp $nextguan
$clearge:
ld a,0
ld (gewei),a
ld a,(shiwei)
add a,1
ld (shiwei),a
jp $nextguan
$clear:
ld a,1
ld (gewei),a
ld a,0
ld (shiwei),a
jp $nextguan

$nextshi:
ld a,(guanshu)
cp 76
jp nc,$clear
ld a,(shiwei)
add a,1
ld (shiwei),a
jp $nextguan

$lastge:
ld a,(guanshu)
cp 1
jp z,$lastguan
ld a,(gewei)
cp 0
jp z,$clearshi
sub a,1
ld (gewei),a
jp $nextguan
$clearshi:
ld a,9
ld (gewei),a
ld a,(shiwei)
dec a
ld (shiwei),a
jp $nextguan

$lastguan:
ld a,5
ld (gewei),a
ld a,8
ld (shiwei),a
jp $nextguan
$lastshi:
ld a,(guanshu)
cp 11
jp c,$lastguan

ld a,(shiwei)
sub a,1
ld (shiwei),a
jp $nextguan
$nextguan:

jp start
$exit:
ret

$_move: ;人物移动

jp $_bianli


$_movebianli:

call _wight
ld a,(haitunh)
call _decsla
add a,b
ld (clearx),a
call _high
ld a,(haitunl)
call _decsla
add a,b
ld (cleary),a
ld hl,aimplace
ld a,(number)
ld (count),a

$_cpaimx:
ld a,(count)
cp 0
jp z,$_clear
dec a
ld (count),a
ld a,(hl)
ld b,a
ld a,(haitunh)
cp b
jp z,$_cpaimy
inc hl
inc hl
jp $_cpaimx
$_cpaimy:
inc hl
ld a,(hl)
ld b,a
ld a,(haitunl)
cp b
jp z,$_drawaim
inc hl
jp $_cpaimx
$_drawaim:
ld a,(clearx)
ld b,a
ld a,(cleary)
ld c,a

ld e,DEST_B
ld hl,DEST_O
ld d, Video_OutShowIcon
ld a,SHOW_PUT
call Video
jp $_drawrect

$_clear:
ld a,(clearx)
add a,10h
ld h,a
ld a,(clearx)
ld b,a
ld a,(cleary)
add a,10h
ld l,a
ld a,(cleary)
ld c,a
ld d,Video_ClearSetArea
ld a,SHOW_PUT
call Video
$_drawrect:
ld a,(clearx)
add a,10h
ld h,a
ld a,(clearx)
ld b,a
ld a,(cleary)
add a,10h
ld l,a
ld a,(cleary)
ld c,a
ld d,Video_DrawRect
ld a,SHOW_PUT
call Video
ld a,(pointx)
ld (haitunh),a
ld a,(pointy)
ld (haitunl),a
call _wight
ld a,(haitunh)
call _decsla
add a,b
ld (clearx),a
call _high
ld a,(haitunl)
call _decsla
add a,b
ld (cleary),a
ld a,(clearx)
ld b,a
ld a,(cleary)
ld c,a
ld e,DOLPHIN_B
ld hl,DOLPHIN_O
ld d, Video_OutShowIcon
ld a,SHOW_PUT
call Video
ld a,(clearx)
add a,10h
ld h,a
ld a,(clearx)
ld b,a
ld a,(cleary)
add a,10h
ld l,a
ld a,(cleary)
ld c,a
ld d,Video_DrawRect
ld a,SHOW_PUT
call Video
ld a,(pointx)
ld (haitunh),a
ld (bianlix),a
ld a,(pointy)
ld (haitunl),a
ld (bianliy),a

ret
; jp $_waite_message
$_bianli:
ld a,2
ld (htflag),a


ld a,0
ld (bianlicount),a
ld a,0
ld (backcount),a
ld a,(haitunl)
ld b,a
ld a,(haitunh)
ld c,a
push bc
$_startbl:
ld a,(bianlix)
dec a
cp 0
jp z,$_bianlixplus
ld a,(bianlix)
dec a
ld b,a
ld a,(bianliy)
call $_threebj
ld a,(bianliflag)
cp 0
jp z,$_bianlixplus
jp $_bianlinew ;给新的数,从新便利


$_bianlixplus:


ld a,(bianlix)
inc a
ld b,a
ld a,(wight)
cp b
jp c,$_bianliydec
ld a,(bianlix)
inc a
ld b,a
ld a,(bianliy)
call $_threebj
ld a,(bianliflag)
cp 0
jp z,$_bianliydec
jp $_bianlinew ;给新的数,从新便利

$_bianliydec:

ld a,(bianliy)
dec a
ld b,a
ld a,0
cp b
jp z,$_bianliyinc
ld a,(bianlix)
ld b,a
ld a,(bianliy)
dec a
call $_threebj
ld a,(bianliflag)
cp 0
jp z,$_bianliyinc
jp $_bianlinew ;给新的数,从新便利

$_bianliyinc:
ld a,(bianliy)
inc a
ld b,a
ld a,(high)
cp b
jp c,$_bianliold

ld a,(bianlix)
ld b,a
ld a,(bianliy)
inc a
call $_threebj
ld a,(bianliflag)
cp 0
jp z,$_bianliold ;要退回了,给以个老的数
jp $_bianlinew ; 给新的数,从新便利

$_threebj: ;;;;;;;;;;;;;;;;三次比较


;;;;;;墙

ld (bianlitempy),a
ld a,b
ld (bianlitempx),a

ld a,(wight)
ld e,a
ld a,(bianlitempy)
dec a
ld d,Equip_MulOneByte
call Function
ld a,l
ld b,a
ld a,(bianlitempx)
add a,b
ld b,a
ld hl,block
ld a,l
add a,b
ld l,a
ld a,h
adc a,0
ld h,a
dec hl
ld a,(hl)
cp 1
jp z,$_setflagzero

;;;;;;;箱子

ld hl,boxnow
ld a,(number)
ld (count),a

$_bjblx:
ld a,(count)
cp 0
jp z,$_access
dec a
ld (count),a
ld a,(hl)
ld b,a
ld a,(bianlitempx)
cp b
jp z,$_bjbly
inc hl
inc hl
jp $_bjblx

$_bjbly:

inc hl
ld a,(hl)
ld b,a
ld a,(bianlitempy)
cp b
jp z,$_setflagzero
inc hl
jp $_bjblx

;;yes,给老的数bianliflag=0

;;;;已经访问过没有

$_access:

ld hl,bianlibuf
ld a,(bianlicount)
ld (tempcount),a

$_bledx:

ld a,(tempcount)
cp 0
jp z,$_setflagone ;;;;; 说明没有便利过
dec a
ld (tempcount),a
ld a,(hl)
ld b,a
ld a,(bianlitempx)
cp b
jp z,$_bledy
inc hl
inc hl
jp $_bledx

$_bledy:
inc hl
ld a,(hl)
ld b,a
ld a,(bianlitempy)
cp b
jp z,$_setflagzero;便利过啊
inc hl
jp $_bledx

$_setflagone:

ld a,1
ld (bianliflag),a
ret

;yes,给老的数bianliflag=0
;no bianliflag =1

$_setflagzero:

xor a
ld (bianliflag),a
ret

$_bianlinew: ;给新的数,从新便利

;还要判断是否为目标
ld a,(pointx)
ld b,a
ld a,(bianlitempx)
cp b
; jp $_movebianli
jp nz,$_blnew
ld a,(pointy)
ld b,a
ld a,(bianlitempy)
cp b
; jp $_movebianli
jp nz,$_blnew

; jp $_movebianli
call $_movebianli
jp $_waite_message
$_blnew:
ld hl,bianlibuf

ld a,(bianlicount)
sla a
ld b,a
ld a,l
add a,b
ld l,a
ld a,h
adc a,0
ld h,a
ld a,(bianlitempx)
ld (hl),a
ld a,(bianlitempy)
inc hl
ld (hl),a
ld a,(bianlitempy)

ld (bianliy),a
ld b,a
ld a,(bianlitempx)
ld (bianlix),a
ld c,a
push bc
; ld a,(backcount)
; inc a
; ld (backcount),a
ld a,(bianlicount)
inc a
ld (bianlicount),a
jp $_startbl

$_bianliold: ;要退回了,给一个老的数
ld a,(bianlix)
ld b,a
ld a,(haitunh)
cp b
jp nz,$_buguanta
ld a,(bianliy)
ld b,a
ld a,(haitunl)
cp b
jp nz,$_buguanta
ld a,(htflag)
dec a
ld (htflag),a
cp 0
jp z,$_waite_message

$_buguanta:

ld hl,backbuf
ld a,(backcount)
sla a
ld b,a
ld a,l
add a,b
ld l,a
ld a,h
adc a,0

ld a,(bianlix)
ld (hl),a
inc hl
ld a,(bianliy)
ld (hl),a
ld a,(backcount)
inc a
ld (backcount),a

;;开始比较是否和backbuf的一样

$_again:
pop bc

ld a,c
ld (bianlix),a
ld a,b
ld (bianliy),a


ld hl,backbuf
ld a,(backcount)
ld (tempback),a
$_nexttempx:
ld a,(tempback)
cp 0
jp z,$_pop
dec a
ld (tempback),a
ld a,(hl)
ld b,a
ld a,(bianlix)
cp b
jp z,$_nexttempy
inc hl
inc hl
jp $_nexttempx
$_nexttempy:
inc hl
ld a,(hl)
ld b,a
ld a,(bianliy)
cp b
jp z,$_again
inc hl

jp $_nexttempx
$_pop:

;ld a,(backcount)
;dec a
;ld (backcount),a
;比较是 否原始点
;cp 0
;jp z,$_waite_message
jp $_startbl

;画矩形的函数
draw_rect:
call _wight
ld (juxin_x),a
call _high
ld (juxin_y),a
ld hl,block
ld (temp),hl
$draw:

ld a,(juxin_x)
ld b,a
ld a,(juxin_y)
ld c,a
ld a,b
add a,10h
ld h,a
ld a,c
add a,10h
ld l,a ;画空地
ld a ,SHOW_PUT
ld d ,Video_DrawRect
call Video
push hl
ld hl,(temp)
ld a,(hl)
inc hl
ld (temp),hl
pop hl
or a
call nz,$well
ld a,(juxin_x)
ld b,a
ld a,(juxin_y)
ld c,a
ld a,b
add a,10h
ld h,a
ld a,c
add a,10h
ld l,a ;画空地
ld a ,SHOW_PUT
ld d ,Video_DrawRect
call Video
ld a,(juxin_x)
add a,10h
ld (juxin_x),a
ld a,(wight)
sla a
sla a
sla a
ld b,a
ld a,80
add a,b
ld hl,juxin_x
sub (hl)
jp nz,$draw
call _wight
ld (juxin_x),a
ld a,(juxin_y)
add a,10h
ld (juxin_y),a
ld a,(high)
sla a
sla a
sla a
ld b,a
ld a,96
add a,b
ld hl,juxin_y
sub (hl)
jp nz,$draw
ret
$well:
ld e,WALL_B ;画墙
ld hl,WALL_O
ld d, Video_OutShowIcon
ld a,SHOW_PUT
call Video
ret

_clear:
ld b,00
ld c,37
ld h,160
ld l,160
ld a,0
ld d,Video_ClearSetArea
call Video
ret
_decsla:
dec a
sla a
sla a
sla a
sla a
ret
_wight:
ld a,(wight)
sla a
sla a
sla a ; *8
ld b,a
ld a,80
sub a,b
ld b,a
ret
_high:
ld a,(high)
sla a
sla a
sla a
ld b,a
ld a,96
sub a,b
ld b,a
ret

Group_Game1:
OBJECT OBJTYPE_GFRAME,0, 0, 0, LCD_WIDTH-1, LCD_HIGH-1,BOX_TOP_B,BOX_TOP_O, 0,0
OBJECT OBJTYPE_BUTTON,CMD_NEXT,110,0,125,15, KEYNEXT_B,KEYNEXT_O,110,0
OBJECT OBJTYPE_BUTTON,CMD_RENEW,95,0,110,15,KEYRENEW_B,KEYRENEW_O,95,0
OBJECT OBJTYPE_BUTTON,CMD_BACK,80,0,95,15,KEYBACK_B,KEYBACK_O,80,0
OBJECT OBJTYPE_BUTTON,CMD_UP1,16,15h,31,35,UP1_B,UP1_O,16,15H
OBJECT OBJTYPE_BUTTON,CMD_UP10,31,15h,46,35,UP10_B,UP10_O,31,15H
OBJECT OBJTYPE_BUTTON,CMD_DOWN10,112,15h,127,35,DOWN10_B,DOWN10_O,112,15H
OBJECT OBJTYPE_BUTTON,CMD_DOWN1,127,15h,142,35,DOWN1_B,DOWN1_O,127,15H
OBJECT OBJTYPE_RESOURCE,0,0,0,0,0,AP_ROMBANK,AP_ROMBANK,0,0
OBJECT OBJTYPE_PANEL, 0, 0, 36, 160, 160, 0,0,0,0
DB 0FFh

string: .db '第',0
string1: .db '关',0
star: .db '★',0

.download_var
clearx: .db 0
cleary: .db 0
temp: .dw 0
shiwei: .db 0
gewei: .db 0
block: .ds 64H
count: .dw 0
juxin_x: .db 0
juxin_y: .db 0
pointx: .db 0
pointy: .db 0
haitunx: .db 0
haituny: .db 0
haitunh: .db 0
haitunl: .db 0
ballx: .db 0
bally: .db 0
wight: .db 0
high: .db 0
number: .db 0
boxplace: .ds 20
aimplace: .ds 20
startplace: .ds 2
address: .dw 0
aimx: .db 0
aimy: .db 0
offset: .dw 0
pianyi: .db 0 ;2(n-1)
guanshu: .db 0
left: .db 0
right: .db 0
up: .db 0
down: .db 0
nextx: .db 0
nexty: .db 0
moveboxx: .db 0
moveboxy: .db 0 ;将要被移动的箱子
boxnow: .ds 24
flag: .db 0
boxbuf: .ds 24
haitunbuf: .ds 24
rectbuf: .ds 24
bufcount: .db 0
buffballx: .db 0
buffbally: .db 0
rectx: .db 0
recty: .db 0
bianlibuf: .ds 40
backbuf: .ds 60
bianlix: .db 0 ;遍利用的临时数
bianliy: .db 0
bianliflag: .db 0
bianlitempx: .db 0
bianlitempy: .db 0
tempcount: .db 0
bianlicount: .db 0
backcount: .db 0
htflag: .db 0
tempback: .db 0
.end

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9408/viewspace-102385/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 改变1995
请登录后发表评论 登录
全部评论

注册时间:2002-04-05

  • 博文量
    464
  • 访问量
    352633