Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- xor ax, ax
- mov ah, 1h
- int 16h
- jz noInp
- push ax
- call Check_Input
- noInp:
- ret
- endp Get_Input
- Key_Pressed EQU [bp+4]
- call DrawMole
- ; push offset Scorearr
- ; push 0
- ; push 2
- ; call Print_str
- ; add [Scorearr+6], "0"
- ;cx is how many times i want to wait 0.55 seconds before the player loses. the number here is very high for debugging reasons, ususally its a lot lower.
- mov cx, 640
- KeyPressLoop:
- push cx
- call Get_Input
- cmp [RightMole], 1
- JE Game_Loop
- pop cx
- push 1
- call Delay
- Loop KeyPressLoop
- jmp GameOver
- ticks equ [bp + 4]
- clock equ es:6Ch
- mov ax, 40h
- mov es, ax
- mov ax, [clock]
- mov cx, ticks
- pop es
- pop cx
- pop ax
- pop bp
- ret 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement