Rev 22 | Rev 25 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 22 | Rev 23 | ||
---|---|---|---|
Line 159... | Line 159... | ||
159 | int 10h |
159 | int 10h |
160 | ret |
160 | ret |
161 | set_bg_color ENDP |
161 | set_bg_color ENDP |
162 | 162 | ||
163 | print_menu_screen PROC |
163 | print_menu_screen PROC |
164 | ; Move cursor to 0, 0 |
164 | ; Clear screen |
165 | mov ah, 02h ; set cursor position |
- | |
166 | mov dh, 0 ; line |
- | |
167 | mov dl, 0 ; column |
- | |
168 | mov bh, 0 ; page |
- | |
169 | int 10h |
165 | call clear_vga |
170 | 166 | ||
171 | ; Set background color |
167 | ; Set background color |
172 | mov bl, 8 ; dark green background |
168 | mov bl, 8 ; dark green background |
173 | call set_bg_color |
169 | call set_bg_color |
174 | 170 | ||
Line 179... | Line 175... | ||
179 | 175 | ||
180 | ret |
176 | ret |
181 | print_menu_screen ENDP |
177 | print_menu_screen ENDP |
182 | 178 | ||
183 | print_error_screen PROC |
179 | print_error_screen PROC |
184 | ; Move cursor to 0, 0 |
180 | ; Clear screen |
185 | mov ah, 02h ; set cursor position |
- | |
186 | mov dh, 0 ; line |
- | |
187 | mov dl, 0 ; column |
- | |
188 | mov bh, 0 ; page |
- | |
189 | int 10h |
181 | call clear_vga |
190 | 182 | ||
191 | ; Set background color |
183 | ; Set background color |
192 | mov bl, 4 ; dark red background |
184 | mov bl, 4 ; dark red background |
193 | call set_bg_color |
185 | call set_bg_color |
194 | 186 | ||
Line 198... | Line 190... | ||
198 | call print_color_string |
190 | call print_color_string |
199 | 191 | ||
200 | ret |
192 | ret |
201 | print_error_screen ENDP |
193 | print_error_screen ENDP |
202 | 194 | ||
203 | print_gameover_screen PROC |
195 | print_gameover_message PROC |
204 | ; Keep cursor position |
196 | ; Keep cursor position |
205 | 197 | ||
206 | ; Set background color |
198 | ; Set background color |
207 | mov bl, 4 ; dark red background |
199 | mov bl, 4 ; dark red background |
208 | call set_bg_color |
200 | call set_bg_color |
Line 211... | Line 203... | ||
211 | mov cl, 0Fh ; white font |
203 | mov cl, 0Fh ; white font |
212 | lea dx, gameover1 |
204 | lea dx, gameover1 |
213 | call print_color_string |
205 | call print_color_string |
214 | 206 | ||
215 | ret |
207 | ret |
216 | print_gameover_screen ENDP |
208 | print_gameover_message ENDP |
217 | 209 | ||
218 | ; ------------------------------------------------------- |
210 | ; ------------------------------------------------------- |
219 | 211 | ||
220 | start: |
212 | start: |
221 | ; Setup data segment |
213 | ; Setup data segment |
Line 308... | Line 300... | ||
308 | 300 | ||
309 | error: |
301 | error: |
310 | ; Video Mode VGA 12 |
302 | ; Video Mode VGA 12 |
311 | call set_screen12 |
303 | call set_screen12 |
312 | 304 | ||
313 | ; Clear screen |
- | |
314 | ; call clear_vga |
- | |
315 | - | ||
316 | ; Print error |
305 | ; Print error |
317 | call print_error_screen |
306 | call print_error_screen |
318 | 307 | ||
319 | ; Give the player time to read the error message (approx 5 seconds) |
308 | ; Give the player time to read the error message (approx 5 seconds) |
320 | call sleep_5 |
309 | call sleep_5 |
321 | 310 | ||
322 | ; Go back to the menu |
311 | ; Go back to the menu |
323 | jmp menu |
312 | jmp menu |
324 | 313 | ||
325 | gameover: |
314 | gameover: |
326 | ; Print gameover screen |
315 | ; Print gameover message |
327 | call print_gameover_screen |
316 | call print_gameover_message |
328 | 317 | ||
329 | ; Give the player time to read the game over message (approx 5 seconds) |
318 | ; Give the player time to read the game over message (approx 5 seconds) |
330 | call sleep_5 |
319 | call sleep_5 |
331 | 320 | ||
332 | ; Go back to the menu |
321 | ; Go back to the menu |