:: commit e21b9d87c95f8e659e3a7c1c2865ba4596a56c14

mintsuki <mintsuki@protonmail.com> — 2021-03-03 21:47

parents: f7a8bbd7f6

Fix sleep_and_quit_on_keypress on BIOS

diff --git a/stage23/lib/sleep.asm b/stage23/lib/sleep.asm
index 11a35900..3ba4ed01 100644
--- a/stage23/lib/sleep.asm
+++ b/stage23/lib/sleep.asm
@@ -105,8 +105,13 @@ pit_sleep_and_quit_on_keypress:
     mov edx, dword [int_08_callback]
     mov dword [0x08*4], edx
 
+    xor edx, edx
+    mov dl, ah
+    xor ah, ah
     push eax
+    push edx
     call getchar_internal
     pop edx
+    pop edx
 
     ret
tab: 248 wrap: offon