From 3f3f9a806dc63ad827fe28724dabe694f6e67f1e Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Fri, 27 Dec 2019 11:10:56 -0500 Subject: apm and smbios stubs, get_char can now wait for printable --- src/kernel/keyb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/kernel/keyb.c') diff --git a/src/kernel/keyb.c b/src/kernel/keyb.c index bae462a..2c87422 100644 --- a/src/kernel/keyb.c +++ b/src/kernel/keyb.c @@ -21,7 +21,13 @@ OF THIS SOFTWARE. #include "vga.h" uint8_t get_char(bool echo) { - uint8_t ch = poll_port(COM2) ? read_byte(COM2) : 0;//TODO: from get_key + uint8_t ch = 0; + do + if (poll_port(COM2)) + ch = read_byte(COM2); + else + ;//TODO: get from get_key + while (!ch); if (echo) put_char(ch); return ch; -- cgit v1.2.3