barely working keyboard

This commit is contained in:
hippoz 2020-11-22 15:36:12 +02:00
parent 0d83b9d955
commit ebf9c7ee91
2 changed files with 9 additions and 2 deletions

View file

@ -8,7 +8,7 @@ void set_idt_gate(int n, uint32_t handler) {
idt[n].low_offset = LOW_16(handler);
idt[n].sel = KERNEL_CS;
idt[n].always0 = 0;
idt[n].flags = 0x8E;
idt[n].flags = 0x8E;
idt[n].high_offset = HIGH_16(handler);
}

View file

@ -17,9 +17,16 @@
void kernel_main() {
terminal_initialize();
remap_pic(0x20, 0x28);
keyboard_init();
//keyboard_init();
isr_install();
terminal_writeline("hello yes");
terminal_writestring("> ");
while (true) {
if (inportb(0x64) & 1) {
const char key = keyboard_to_ascii(parse_keycode(inportb(0x60)));
terminal_putchar(key);
}
}
}