From 3a68807cd4462d277eb88460f6acc1ce7d0df69b Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Fri, 6 Dec 2019 17:05:26 -0500 Subject: [PATCH] kbd: make kbdGetC blocking I forgot to update this when changing stdio GetC API. --- kernel/kbd.asm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/kbd.asm b/kernel/kbd.asm index 56615d8..fee5638 100644 --- a/kernel/kbd.asm +++ b/kernel/kbd.asm @@ -65,7 +65,7 @@ kbdGetC: ld a, (hl) pop hl ; <-- lvl 1 or a - jp z, unsetZ ; no code. Keep A at 0, but unset Z + jr z, kbdGetC ; no code. Keep A at 0, but unset Z ; We have something! cp a ; ensure Z ret @@ -85,7 +85,7 @@ kbdGetC: ; A scan code over 0x80 is out of bounds or prev KC tell us we should ; skip. Ignore. xor a - jp unsetZ + jr kbdGetC .nothing: ; We have nothing. Before we go further, we'll wait a bit to give our ; device the time to "breathe". When we're in a "nothing" loop, the z80 @@ -97,7 +97,7 @@ kbdGetC: nop djnz .wait pop bc - jp unsetZ + jr kbdGetC ; Whether KC in A is L or R shift .isShift: cp KBD_KC_LSHIFT