Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. xor ax, ax
  2. mov ah, 1h
  3. int 16h
  4. jz noInp
  5.  
  6.  
  7. push ax
  8. call Check_Input
  9. noInp:
  10.  
  11. ret
  12. endp Get_Input
  13.  
  14.  
  15.  
  16. Key_Pressed EQU [bp+4]
  17.  
  18. call DrawMole
  19.  
  20. ; push offset Scorearr
  21. ; push 0
  22. ; push 2
  23. ; call Print_str
  24. ; add [Scorearr+6], "0"
  25.  
  26. ;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.
  27. mov cx, 640
  28.  
  29. KeyPressLoop:
  30. push cx
  31.  
  32.  
  33.  
  34. call Get_Input
  35. cmp [RightMole], 1
  36. JE Game_Loop
  37. pop cx
  38. push 1
  39. call Delay
  40.  
  41.  
  42. Loop KeyPressLoop
  43. jmp GameOver
  44.  
  45. ticks equ [bp + 4]
  46. clock equ es:6Ch
  47.  
  48. mov ax, 40h
  49. mov es, ax
  50. mov ax, [clock]
  51.  
  52. mov cx, ticks
  53.  
  54. pop es
  55. pop cx
  56. pop ax
  57. pop bp
  58. ret 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement