From 483754ab27f2a58011f723efa52163a83c63e56e Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Sun, 1 Feb 2015 16:50:55 -0500 Subject: lots of stuff --- kernel/main.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'kernel/main.c') diff --git a/kernel/main.c b/kernel/main.c index 219e3ee..fd56fb0 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -1,14 +1,31 @@ -#include "string.h" +#include "gdt.h" +#include "idt.h" +#include "isr.h" +#include "irq.h" #include "tty.h" -#include "vga.h" +#include -void main(void) +void irq1(struct regs_t *regs) +{ + printf("Keypress\n"); +} + +void main(struct multiboot_header *hdr, uint32_t magic) { tty_init(); + gdt_init(); - tty_puts("GDT initialized\n"); - tty_set_color(VGA_MAKE_COLOR(VGA_LIGHT_GRAY, VGA_BLACK)); - tty_puts("Hello, world!\n"); + printf("GDT initialized.\n"); + + idt_init(); + printf("IDT initialized.\n"); + + isr_init(); + irq_init(); + + irq_set_handler(1, irq1); + + printf("Hello, world!\n"); while(1) ; } -- cgit v1.1