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

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

;--------------------------------------------------------------------------------
;此模板是纯DOS程序代码,需要MASM5.0,编译时请使用"编译 -> DOS"方式。
;--------------------------------------------------------------------------------
逆风者
Init_game macro op1,op2,op3,op4,op5,op6

mov cx,00h
mov dh,op1
mov dl,op2
op6:
mov ah,02h
mov bh,00h
int 10h

push cx
mov ah,0ah
mov al,op3
mov bh,00h
mov cx,01h
int 10h
pop cx

inc cx
inc op4
cmp cx,op5
jne op6

endm

clear_screen macro op1,op2,op3,op4
mov ah,06h
mov al,00h
mov bh,07h
mov ch,op1
mov cl,op2
mov dh,op3
mov dl,op4
int 10h

mov ah,02h
mov bh,00h
mov dh,00h
mov dl,00h
int 10h
endm


menu macro op1,op2,op3
mov ah,02h
mov bh,00h
mov dh,op1
mov dl,op2
int 10h

mov ah,09h
lea dx,op3
int 21h
endm


data segment

linjiang db "Made by lin jiang$"
no db "NO.:021411$"
meg db "Let us have a game!!Come on!!$"
meg1 db "**Select Menu**$"
meg2 db "Please select the game speed,ESC to quit.$"
meg3 db "1.Very slow Too easy,speed up!$"
meg4 db "2.Slow Everybody can deal.$"
meg5 db "3.Nomal I think you can deal!$"
meg6 db "4.Fast A challenge.Pay attention!$"
meg7 db "5.Very Fast Too hard,Have a try?$"
meg8 db "6.Fastest Are you crazy??$"
meg9 db "*Select the number among 1-6 and press ENTER to start!*$"
meg10 db "Game Speed Select:$"

hotkey db "When you are playing games:$"
hotkey1 db "ESC to return to menu$"
hotkey2 db "SPACE to pause the game$"
hotkey3 db "Press any key to play games......$"
hotkey4 db "Are you ready??$"

failmeg db "The letter is arrive the bottom, You are lost ! :($"
failmeg0 db "Press ENTER to go on......$"
failmeg1 db "Game is over!$"
failmeg2 db "Press ENTER to return menu and press ESC to exit!$"
failmeg3 db "Bye-Bye!Thank for your playing!!$"
failmeg4 db "Press any key to quit......$"

speed dw 00d,1200d,800d,600d,400d,200d,100d


letters db "jwmilzoeucgpravskntxhdyqfb"
db "iytpkwnxlsvxrmofzhgaebudjq"
db "nwimzoexrphysfqtvdcgljukda"

letters_bak db "jwmilzoeucgpravskntxhdyqfb"
db "iytpkwnxlsvxrmofzhgaebudjq"
db "nwimzoexrphysfqtvdcgljukda"

letter_counter db 0
life_flag db 78 dup(0)

position_flag db 78 dup(0)
present_position db 1

data ends

stack segment para stack 'stack'
db 64 dup(0)
stack ends

code segment
main proc far
assume cs:code,ds:data,ss:stack
start:

mov ax,data
mov ds,ax

mov letter_counter,00h
mov present_position,1

lea si,position_flag

mov ah,00h
mov cx,00h

init_postion_flag:
mov [si],ah
inc si
inc cx
cmp cx,78d
jne init_postion_flag

lea di,letters
lea si,letters_bak
mov cx,00h
init_letters:
mov ah,[si]
mov [di],ah
inc si
inc di
inc cx
cmp cx,78d
jne init_letters


mov ah,00h
lea si,life_flag
mov cx,00h
init_life_flag:
mov [si],ah
inc si
inc cx
cmp cx,78d
jne init_life_flag


mov cx,00h
mov ah,01h
or ch,00010000b
int 10h

clear_screen 00d,00d,24d,79d

Init_game 00d,00d,0ah,dl,80d,nextsign1

Init_game 24d,00d,0ah,dl,80d,nextsign2

Init_game 00d,00d,0ah,dh,25d,nextsign3

Init_game 00d,79d,0ah,dh,25d,nextsign4


menu 01d,15d,meg ;菜单信息的宏展开
menu 01h,61d,linjiang
menu 03d,20d,meg1
menu 03d,68d,no
 

本文章更多内容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
汇编源码--getspace 2007-08-31
汇编源码--frespace 2007-08-31
CIH文件型病毒检测消除程序 2007-08-31
Mixer Volume Ctrler V1.0 2007-08-31
汇编源码--COMINT 2007-08-31
自己用汇编语言写的一个病毒(源码... 2007-08-31
汇编源码--col 2007-08-31
汇编源码--BURNOUT 2007-08-31