- UID
- 35757
注册时间2007-8-30
阅读权限8
最后登录1970-1-1
初入江湖
该用户从未签到
|
源代码如下:
clear macro p1,p2,p3,p4,
mov ah,6
mov al,0
mov ch,p1
mov cl,p2
mov dh,p3
mov dl,p4
mov bh,7
int 10h
endm
print macro p1,p2
mov al,p1
mov cx,p2
mov ah,9h
int 10h
endm
printsz macro p1,p2;set es
mov al,0
lea bp,p1
mov cx,p2
mov ah,13h
int 10h
endm
wcur macro p1,p2;set bh=0
mov dh,p1
mov dl,p2
mov ah,2h
int 10h
endm
rcur macro
mov ah,08h
int 10h
endm
.model small
.data
over_h dw 0
over_l dw 0
head_h dw 0
head_l dw 0
pt_h dw 0 ;?
pt_l dw 0
queue_len dw 0
tou_h db 0
tou_l db 0
wei_h db 0
wei_l db 0
food_h db 20,5 ,9 ,7 ,13,16,6 ,7 ,10,23,18,14,15,9,15,19
db 21,6,20,11,15,20,21,14,7 ,9 ,8 ,10,24,17,5 ,13
db 18,9 ,16,19,22,13,18,23,6 ,8 ,15,23,18,17,9 ,9
db 9 ,16,15,20,6 ,9,22,24,24,21,16,5 ,19,17,16,14
db 13,10,18,22,5 ,6 ,7 ,21,19,18,20,14,9,16,17,13,19,0ffh
ph_food db 0
food_l db 40,24,15,47,19,45,67,79,62,46,51,1 ,3 ,8,68,21
db 68,2,38,45,29,15,6 ,55,77,66,13,30,60,75,12,15
db 74,77,16,5 ,5 ,54,52,39,37,44,67,66,51,20,21,66
db 77,33,55,28,46,1,71,73,0 ,0 ,58,69,49,21,56,30
db 33,45,59,54,65,68,22,11,8 ,76,32,62,4,22,38,38,24,0ffh
pl_food db 0
nfood db 0
direct db 3
speed db 0
t_speed db 0
;
mar_top equ 5
mar_down equ 23
mar_left equ 0
mar_right equ 79
;
SUCCESS db 2 ; =0 ok,1 lose,2 yumen
yu_shap equ 07h
yu_color equ 0eh
szscore db ' You have got ,thanks for playing anything exit !'
nscore equ $-szscore
szlose db 'You Lose !'
nlose equ $-szlose
szwin db 'Congratulations ! ~~~~~~You are the winner !'
nwin equ $-szwin
szgood db 'GOOD , Just go on ! -_-!!'
ngood equ $-szgood
;
queue_h db 200 dup(0);行藕
queue_l db 200 dup(0);辛藕
;
.code
yuyu proc far public
yuyu_start:
push ax
push bx
push cx
push dx
push di
push si
push ds
push es
mov ax,@data
mov ds,ax
mov es,ax
;cursor unvisible
mov ah,1
mov cx,1000h
int 10h
clear 0,0,23,79
clear mar_top,mar_left,mar_down,mar_right
;
mov bx,offset queue_h
mov byte ptr [bx],12
inc bx
mov byte ptr [bx],12
inc bx
mov byte ptr [bx],12
;
mov bx,offset queue_l
mov byte ptr [bx],30
inc bx
mov byte ptr [bx],28
inc bx
mov byte ptr [bx],29
;
;
;
mov ax,offset queue_h
mov head_h,ax
inc ax
mov over_h,ax
mov ax,offset queue_l
mov head_l,ax
inc ax
mov over_l,ax
mov bx,head_h
mov al,byte ptr [bx]
mov tou_h,al
mov bx,head_l
mov al,byte ptr [bx]
mov tou_l,al
mov bx,over_h
mov al,byte ptr [bx]
mov wei_h,al
mov bx,over_l
mov al,byte ptr [bx]
mov wei_l,al
mov bh,0
mov bl,yu_color
wcur wei_h,wei_l
print yu_shap,1
wcur [queue_h+2],[queue_l+2]
print yu_shap,1
wcur tou_h,tou_l
print yu_shap,1
mov queue_len,3
mov direct,3
mov speed,3
mov t_speed,3
mov SUCCESS,2
;;;;;;;;;;;;;;;;;;;;
mov ph_food,0
mov pl_food,0
mov nfood,0
call food
;
mov si,es
mov ax,351ch
int 21h
push es
push bx
mov es,si
push ds
mov dx,offset move
mov ax,seg move
m |
|