diff options
Diffstat (limited to 'kernel/main.c')
| -rw-r--r-- | kernel/main.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/kernel/main.c b/kernel/main.c index 0ec03f0..dc0926d 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -27,12 +27,23 @@ void gpf(struct regs_t *regs) panic("GPF!"); } +void int80(struct regs_t *regs) +{ + switch(regs->eax) + { + case 0: + panic((const char*)regs->ebx); + break; + case 1: + puts((const char*)regs->ebx); + break; + } +} + void main(struct multiboot_info_t *hdr, uint32_t magic) { fpu_enable(); - asm("movq %xmm0, %xmm0"); - /* this should go to port e9, which is the Bochs debug port */ printf("Testing early I/O\n"); @@ -64,6 +75,7 @@ void main(struct multiboot_info_t *hdr, uint32_t magic) ps2_init(); set_interrupt_handler(0xd, gpf); + set_interrupt_handler(0x80, int80); asm("sti"); @@ -71,9 +83,18 @@ void main(struct multiboot_info_t *hdr, uint32_t magic) printf("Kernel version %s: \"%s\"\n", KAPPA_KERNEL_VERSION, KAPPA_KERNEL_CODENAME); + //printf("Starting linked-in application XRacer...\n"); printf("Running graphics benchmark...\n"); srand(42); + gfx_drawcircle(100, 100, 100); + + gfx_fillcircle(50, 30, 20); + + while(1); + + //xracer_main(); + if(gfx_status) { const int width = *gfx_width; |