From 042e25e19b5fc0cec1d47440c26246c886cf39f6 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Sun, 17 May 2015 20:40:29 +0200 Subject: started big cleanup! --- kernel/kernel.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'kernel/kernel.c') diff --git a/kernel/kernel.c b/kernel/kernel.c index de435c5..098fc64 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -40,28 +40,27 @@ fool_os *get_fool() } +static void put_kb(uint8_t c) +{ + vt52_kb(get_fool()->tty1,c); +} + void kernel_main(uint32_t eax,uint32_t ebx) { // - // Setup terminal output + // Setup terminal output / input // term_out screen; screen.put_char=console_put_char; screen.update_cursor=update_cursor; - vt52_tty tty=vt52_init(&screen); - get_fool()->tty1=&tty; - // - // Setup terminal input - // - /* - term_in keyboard; - kb.get_char=console_put_char; - screen.update_cursor=update_cursor; - vt52_tty tty=vt52_init(&screen); + term_in input; + + vt52_tty tty=vt52_init(&screen,&input); get_fool()->tty1=&tty; - */ + + keyboard_init(put_kb); -- cgit v1.2.3