Rev 14 | Rev 21 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 14 | Rev 17 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | 1 | ||
2 | ; Aysalia DOS Launcher |
2 | ; Aysalia DOS Launcher |
3 | ; Launches aydos1.gam and aydos2.gam |
3 | ; Launches aydos1.gam and aydos2.gam |
4 | ; Revision 2018-12-05 |
4 | ; Revision 2018-12-06 |
5 | ; (C) 2018 Daniel Marschall, ViaThinkSoft |
5 | ; (C) 2018 Daniel Marschall, ViaThinkSoft |
6 | 6 | ||
7 | .model small |
7 | .model small |
8 | .stack 10h |
8 | .stack 10h |
9 | 9 | ||
Line 42... | Line 42... | ||
42 | menu15 db ' 9 Beenden',13,10,'$' |
42 | menu15 db ' 9 Beenden',13,10,'$' |
43 | menu16 db '', 13, 10, '$' |
43 | menu16 db '', 13, 10, '$' |
44 | menu17 db '', 13, 10, '$' |
44 | menu17 db '', 13, 10, '$' |
45 | menu18 db '', 13, 10, '$' |
45 | menu18 db '', 13, 10, '$' |
46 | 46 | ||
- | 47 | error1 db '',13,10,'$' |
|
- | 48 | error2 db 'Fehler: Spiel kann nicht gestartet werden. Fehlt eine Datei?',13,10,'$' |
|
- | 49 | error3 db '',13,10,'$' |
|
- | 50 | ||
47 | gameover1 db '',13,10,'$' |
51 | gameover1 db '',13,10,'$' |
48 | gameover2 db 'Spiel zu Ende!',13,10,'$' |
52 | gameover2 db 'Spiel zu Ende!',13,10,'$' |
49 | gameover3 db '',13,10,'$' |
53 | gameover3 db '',13,10,'$' |
50 | 54 | ||
51 | ; ------------------------------------------------------- |
55 | ; ------------------------------------------------------- |
Line 102... | Line 106... | ||
102 | int 21h |
106 | int 21h |
103 | ret |
107 | ret |
104 | exit_to_dos ENDP |
108 | exit_to_dos ENDP |
105 | 109 | ||
106 | sleep_5 PROC |
110 | sleep_5 PROC |
107 | mov ah, 86h |
111 | mov ah, 0 ; function no. for read |
- | 112 | int 1Ah ; get the time of day count |
|
- | 113 | add dx, 65 ; dx=9 is 0.5 sec |
|
- | 114 | mov bx, dx ; store end of delay value in bx |
|
- | 115 | again: |
|
108 | mov cx, 004bh |
116 | int 1Ah |
109 | mov dx, 4000h |
117 | cmp dx, bx |
110 | int 15h |
118 | jne again |
111 | ret |
119 | ret |
112 | sleep_5 ENDP |
120 | sleep_5 ENDP |
113 | 121 | ||
114 | print_menu_screen PROC |
122 | print_menu_screen PROC |
115 | mov ah, 9 |
123 | mov ah, 9 |
Line 150... | Line 158... | ||
150 | lea dx, menu18 |
158 | lea dx, menu18 |
151 | int 21h |
159 | int 21h |
152 | ret |
160 | ret |
153 | print_menu_screen ENDP |
161 | print_menu_screen ENDP |
154 | 162 | ||
- | 163 | print_error_screen PROC |
|
- | 164 | mov ah, 9 |
|
- | 165 | lea dx, error1 |
|
- | 166 | int 21h |
|
- | 167 | lea dx, error2 |
|
- | 168 | int 21h |
|
- | 169 | lea dx, error3 |
|
- | 170 | int 21h |
|
- | 171 | ret |
|
- | 172 | print_error_screen ENDP |
|
- | 173 | ||
155 | print_gameover_screen PROC |
174 | print_gameover_screen PROC |
156 | mov ah, 9 |
175 | mov ah, 9 |
157 | lea dx, gameover1 |
176 | lea dx, gameover1 |
158 | int 21h |
177 | int 21h |
159 | lea dx, gameover2 |
178 | lea dx, gameover2 |
Line 226... | Line 245... | ||
226 | mov al, 00h ; load and execute |
245 | mov al, 00h ; load and execute |
227 | mov bx, paramblk |
246 | mov bx, paramblk |
228 | lea dx, exename1 |
247 | lea dx, exename1 |
229 | int 21h |
248 | int 21h |
230 | 249 | ||
- | 250 | ; Is everything OK? Or is the GAM file missing? |
|
- | 251 | jc error |
|
- | 252 | ||
231 | ; Notify the player that the game has finished |
253 | ; Notify the player that the game has finished |
232 | jmp gameover |
254 | jmp gameover |
233 | 255 | ||
234 | prog2: |
256 | prog2: |
235 | ; Clear screen |
257 | ; Clear screen |
Line 243... | Line 265... | ||
243 | mov al, 00h ; load and execute |
265 | mov al, 00h ; load and execute |
244 | mov bx, paramblk |
266 | mov bx, paramblk |
245 | lea dx, exename2 |
267 | lea dx, exename2 |
246 | int 21h |
268 | int 21h |
247 | 269 | ||
- | 270 | ; Is everything OK? Or is the GAM file missing? |
|
- | 271 | jc error |
|
- | 272 | ||
248 | ; Notify the player that the game has finished |
273 | ; Notify the player that the game has finished |
249 | jmp gameover |
274 | jmp gameover |
250 | 275 | ||
- | 276 | error: |
|
- | 277 | ; Video Mode VGA 12 |
|
- | 278 | call set_screen12 |
|
- | 279 | ||
- | 280 | ; Clear screen |
|
- | 281 | ; call clear_vga |
|
- | 282 | ||
- | 283 | ; Print error |
|
- | 284 | call print_error_screen |
|
- | 285 | ||
- | 286 | ; Give the player time to read the error message (approx 5 seconds) |
|
- | 287 | call sleep_5 |
|
- | 288 | ||
- | 289 | ; Go back to the menu |
|
- | 290 | jmp menu |
|
- | 291 | ||
251 | gameover: |
292 | gameover: |
252 | ; Print gameover screen |
293 | ; Print gameover screen |
253 | call print_gameover_screen |
294 | call print_gameover_screen |
254 | 295 | ||
255 | ; Give the player time to read the game over message (approx 5 seconds) |
296 | ; Give the player time to read the game over message (approx 5 seconds) |