您的位置:逆风者 汇编技术 正文
原作者:www.upwinder.com 添加时间:2007-09-02 原文发表:2007-08-31 人气:91 来源:未知

本文章共4228字,分3页,当前第3页,快速翻页:
 

cmp cx,speed
je print
jmp out_cycle


pause: push dx ;暂停处理
mov ah,06h
mov dl,0ffh
int 21h
pop dx
cmp al," "
jne pause

jmp pass


to_start1: ;返回主菜单
逆风编程技术
jmp start

print:


mov ah,0ah
mov al," "
mov bh,00h
mov cx,01h
int 10h

inc dh
mov ah,02h
mov bh,00h
int 10h

mov ah,0ah
mov al,[di]
mov bh,00h
mov cx,01h
int 10h

pop cx
inc cx
cmp cx,21d
je print_next_letter
jmp nextrow ; 下一行

disappear: ; 击中字母后的相关处理
pop cx
pop cx

mov ah,0ah
mov al," "
mov bh,00h
mov cx,01h
int 10h


jmp hit


print_next_letter: ; 处理原位置的空缺
lea si,life_flag
add si,word ptr present_position
dec si

mov ah,[si]
cmp ah,1
je fail

mov ah,0ah
mov al," "
mov bh,00h
mov cx,01h
int 10h


inc dh
mov ah,02h
mov bh,00h
int 10h

mov ah,0ah
mov al," "
mov bh,00h
mov cx,01h
int 10h


mov ah,1
mov [si],ah


hit: mov ah,02h
mov bh,00h
mov dh,01h
mov dl,present_position
int 10h

mov al,[di] ; 出现下一个新字母的数法
add al,7
cmp al,7ah
ja convey_letter
mov ah,0ah
mov bh,00h
mov cx,01h
int 10h

mov [di],al
add letter_counter,01h
jmp nextcycle

convey_letter:
sub al,7ah
add al,61h
mov ah,0ah
mov bh,00h
mov cx,01h
int 10h

mov [di],al
add letter_counter,01h
jmp nextcycle

fail: mov ah,0ah ;游戏失败后的相关处理
mov al," "
mov cx,01h
int 10h

inc dh
mov ah,02h
mov bh,00h
int 10h

mov ah,0ah
mov al,[di]
mov bh,00h
mov cx,01h
int 10h

mov ah,02h
mov bh,00h
mov dh,12d
mov dl,17d
int 10h

push dx
mov ah,09h
lea dx,failmeg
int 21h
pop dx

add dh,2
mov ah,02h
mov bh,00h
int 10h

mov ah,09h
lea dx,failmeg0
int 21h

re: mov ah,07h
int 21h
cmp al,0dh
jne re


clear_screen 01,01,23,78
mov ah,02h
mov bh,00h
mov dh,11d
mov dl,20d
int 10h

push dx
mov ah,09h
lea dx,failmeg1
int 21h
pop dx

inc dh
inc dh
mov ah,02h
mov bh,00h
int 10h

mov ah,09h
lea dx,failmeg2
int 21h

notkey:
mov ah,07h
int 21h
cmp al,0dh
je to_start
cmp al,1bh
je over
jmp notkey
to_start:
clear_screen 00,00,24,79
jmp start

over: clear_screen 01,01,23,78
mov ah,02h
mov bh,00h
mov dh,11d
mov dl,15h
int 10h

mov ah,09h
lea dx,failmeg3
int 21h

mov ah,02h
mov bh,00h
mov dh,13d
mov dl,15h
int 10h

mov ah,09h
lea dx,failmeg4
int 21h

mov ah,07h
int 21h

mov ah,07h
int 21h

clear_screen 00,00,24,79

mov ax,4c00h
int 21h


main endp
code ends
end start 


 
本文章更多内容<<上一页 - 1 - 2 - 3
相关文章

汇编源码--CLR
汇编源码--drives
汇编源码--cdcheck
汇编源码--gameport
侦测CPU型号
汇编源码--free
通用的图形字模和汉字字模汇编程序
汇编源码--chips
汇编源码--BRK
Game Faster V1.0
GET TIME OF DAY(获取时间)
汇编语言制作的光带菜单及源程序(1.0)
DOS6.0源程序中的硬盘引导记录源程序FDBOOT
汇编源码--sound
输入10进制,输出2进制
汇编源码--drivesex
获得操作系统版本的汇编源代码
MAKE SOUNDS (发声)
汇编源码--break
V86模式切换程序

相关评论


本文章所属分类:首页 汇编技术

  热门关键字:
进制数据输出的通用程序 2007-09-12
汇编源码--showmem 2007-08-31
汇编源码--CLEAN 2007-08-31
汇编源码--hdr 2007-08-31
汇编源码--basload 2007-08-31
汇编源码--CHAR 2007-08-31
汇编源码--fxn 2007-08-31
汇编源码--alarm 2007-08-31
汇编源码--getsect 2007-08-31
汇编源码--DEV 2007-08-31