From d94b024b73aeca06de417e0fd3c502495312a8b2 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 7 Dec 2019 13:40:28 +0100 Subject: Added userspace libc and began userspace based shell --- src/kernel/lib/stdio/getch.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/kernel/lib/stdio/getch.c (limited to 'src/kernel/lib/stdio/getch.c') diff --git a/src/kernel/lib/stdio/getch.c b/src/kernel/lib/stdio/getch.c new file mode 100644 index 0000000..5361c97 --- /dev/null +++ b/src/kernel/lib/stdio/getch.c @@ -0,0 +1,9 @@ +#include +#include + +char getch() +{ + keyboard_clear_buffer(); + while (strlen(keyboard_buffer) == 0) {} + return keyboard_buffer[0]; +} \ No newline at end of file -- cgit v1.2.3