wok-tiny diff bootmine/stuff/mine.asm @ rev 182
Update bootpillman & bootsokoban
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Sep 24 17:53:05 2023 +0000 (8 months ago) |
parents | e05af9592e8b |
children | 61c76233911e |
line diff
1.1 --- a/bootmine/stuff/mine.asm Wed Sep 20 13:08:44 2023 +0000 1.2 +++ b/bootmine/stuff/mine.asm Sun Sep 24 17:53:05 2023 +0000 1.3 @@ -48,7 +48,7 @@ 1.4 1.5 ;; Keyboard ASCII codes 1.6 %assign Key.Ascii.RestartGame 'r' 1.7 -%assign Key.Ascii.QuitGame 'q' 1.8 +%assign Key.Ascii.QuitGame 27 1.9 1.10 ;; This is a convenience macro for creating VGA characters. VGA characters are 1.11 ;; 16 bit words, with the lower byte as the ASCII value and the upper byte 1.12 @@ -150,9 +150,14 @@ 1.13 %ifndef USE_RDTSC 1.14 ; Initialyze the simple pseudo-random number generator 1.15 ; seed = set_system_time() 1.16 + %if 1 1.17 cbw 1.18 int 0x1a 1.19 push dx 1.20 + %else 1.21 + in al,(0x40) ; Read timer 1.22 + push ax 1.23 + %endif 1.24 %endif 1.25 1.26 ;; Populate text buffer with mines and digits 1.27 @@ -273,6 +278,10 @@ 1.28 ; http://www.delorie.com/djgpp/doc/rbinter/id/63/17.html 1.29 xor ax, ax 1.30 int 0x16 1.31 +%ifdef DOS_QUIT 1.32 + cmp al, Key.Ascii.QuitGame 1.33 + je Quit 1.34 +%endif 1.35 1.36 ; bx and cx are zeroed from the PopulateTextBuf loops above 1.37 ; bx = y coord 1.38 @@ -322,10 +331,12 @@ 1.39 int 0x16 1.40 %ifdef DOS_QUIT 1.41 cmp al, Key.Ascii.QuitGame 1.42 - jnz .notQuit 1.43 + jnz Quit.notQuit 1.44 +Quit: 1.45 mov ax,0x0003 ; Restore text mode 1.46 int 0x10 1.47 int 0x20 1.48 + int 0x19 1.49 .notQuit: 1.50 %endif 1.51 cmp al, Key.Ascii.RestartGame