diff options
Diffstat (limited to 'src/kernel/keyb.c')
-rw-r--r-- | src/kernel/keyb.c | 8 |
1 files changed, 7 insertions, 1 deletions
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; |