-
Notifications
You must be signed in to change notification settings - Fork 1
/
menu.asm
175 lines (145 loc) · 2.33 KB
/
menu.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
;a macro to print msgs
print macro string
pusha
lea dx, string
mov ah, 09h
int 21h
popa
endm
mouse macro x, y
pusha
mov ah, 02h
mov bx, 0
mov dh, x
mov dl, y
int 10h
popa
endm
; code starts here
.model small
.stack 100h
.data
play0 db "------",'$'
play db "| PLAY |",'$'
resume0 db"--------",'$'
resume db "| RESUME |", '$'
scoreboard0 db"-------------",'$'
scoreboard db "| SCORE BOARD |",'$'
exitmsg0 db"------",'$'
exitmsg db"| EXIT |", '$'
;BORDER1 DB"/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\",'$'
;BORDER2 DB"\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/",'$'
border1 db"/\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\ /\/\",'$'
border2 db"\ / \ / \ / \ / \ / \ / \ / \ /",'$'
border3 db" \/ \/ \/ \/ \/ \/ \/ \/",'$'
heart1 db"/\/\",'$'
heart2 db"\ /", '$'
heart3 db" \/", '$'
square1 dw 120
.code
mov ax, @data
mov ds, ax
mov ah, 00h
mov al, 13h
int 10h
mouse 0, 0
print border1
mouse 1, 0
print border2
mouse 2, 0
print border3
mouse 4, 0
print heart1
mouse 5, 0
print heart2
mouse 6, 0
print heart3
mouse 8, 0
print heart1
mouse 9, 0
print heart2
mouse 10, 0
print heart3
mouse 12, 0
print heart1
mouse 13, 0
print heart2
mouse 14, 0
print heart3
mouse 16, 0
print heart1
mouse 17, 0
print heart2
mouse 18, 0
print heart3
mouse 20, 0
print heart1
mouse 21, 0
print heart2
mouse 22, 0
print heart3
;;;;;;;;;;;;;;;;
mouse 4, 196
print heart1
mouse 5, 196
print heart2
mouse 6, 196
print heart3
mouse 8, 196
print heart1
mouse 9, 196
print heart2
mouse 10, 196
print heart3
mouse 12, 196
print heart1
mouse 13, 196
print heart2
mouse 14, 196
print heart3
mouse 16, 196
print heart1
mouse 17, 196
print heart2
mouse 18, 196
print heart3
mouse 20, 196
print heart1
mouse 21, 196
print heart2
mouse 22, 196
print heart3
;print play
mouse 4, 16
print play0
mouse 5, 15
print play
mouse 6, 16
print play0
;print resume
mouse 9, 15
print resume0
mouse 10, 14
print resume
mouse 11, 15
print resume0
;print scoreBoard
mouse 14, 13
print scoreboard0
mouse 15, 12
print scoreboard
mouse 16, 13
print scoreboard0
;print exit
mouse 19, 16
print exitmsg0
mouse 20, 15
print exitmsg
mouse 21, 16
print exitmsg0
;mouse 0, 30
;print border1
exit:
mov ah, 4ch
int 21h
end