From 200c311bcf3c43562f6f72c6da33bccd4aba0487 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Tue, 17 Jul 2018 23:02:27 +0200 Subject: [PATCH] add missing pit irq handler --- irq_handler.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/irq_handler.c b/irq_handler.c index fc50e7a..7a30083 100644 --- a/irq_handler.c +++ b/irq_handler.c @@ -1,7 +1,22 @@ #include "interrupt.h" +#include "vga.h" +#include "io.h" // Need GCC > 6 __attribute__((interrupt)) void keyboard_handler(struct interrupt_frame *frame) { - (void)frame; + printString("Keyboard!", RED, BLACK, 0, 7); + char c = 0; + if (inb(0x60) != c) { + c = inb(0x60); + if (c > 0) + printChar(c, RED, BLACK, 0, 8); + } + (void)frame; +} + +__attribute__((interrupt)) void timer_handler(struct interrupt_frame *frame) +{ + printString("Timer!", RED, BLACK, 0, 9); + (void)frame; }