-
Notifications
You must be signed in to change notification settings - Fork 0
/
paranoid.asm
66 lines (52 loc) · 1.2 KB
/
paranoid.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
.model small
.stack 100h
.data
map db 1 dup(40 dup(0))
db 13 dup(40 dup(1))
db 25 dup(40 dup(0))
db 9 dup(40 dup(0))
db 16 dup(0),3,24 dup(0)
db 14 dup(0),2,2,2,2,2,21 dup(0)
barPos db 15
ballPosX dw 16
ballPosY dw 48
intro db "PARANOID"
credits db "BUILD BY FURQAN & HASNAIN"
instruct db "PRESS SPACE TO CONTINUE"
WIN db "YOU WON"
OVER db "GAME OVER"
ball_dx dw 1
ball_dy dw -1
GAMEOVER_FLAG dw 0
WIN_FLAG dw 1
WAIT_TIME dw ?
include collisions.asm
include time.asm
include keyboard.asm
include motion.asm
include mapping.asm
include pages.asm
.code
main proc
mov ax,@data
mov ds,ax
call initScreen
MAINLOOP:
mov [WIN_FLAG],1
call shwMap
call mvBall
cmp [GAMEOVER_FLAG],1
je GAMEOVR
cmp [WIN_FLAG],1
je GAMEWN
call detectBoundaries
call detectCollision
call getInput
call delay
jmp MAINLOOP
GAMEOVR:
call gameover
GAMEWN:
call gamewon
main endp
end main