aboutsummaryrefslogtreecommitdiff
path: root/kernel/main.c
diff options
context:
space:
mode:
authorFranklin Wei <frankhwei536@gmail.com>2015-02-14 10:55:22 -0500
committerFranklin Wei <frankhwei536@gmail.com>2015-02-14 10:55:22 -0500
commitef4cc242dc8ad04320d19af22931fcbdbf670c13 (patch)
tree50af19ff8e207870e2fdbad6d2a9ea669c901da8 /kernel/main.c
parentca1c4f58224404d4361e8ca16837e48c88c0ee38 (diff)
downloadkappa-ef4cc242dc8ad04320d19af22931fcbdbf670c13.zip
kappa-ef4cc242dc8ad04320d19af22931fcbdbf670c13.tar.gz
kappa-ef4cc242dc8ad04320d19af22931fcbdbf670c13.tar.bz2
kappa-ef4cc242dc8ad04320d19af22931fcbdbf670c13.tar.xz
Stuff
Diffstat (limited to 'kernel/main.c')
-rw-r--r--kernel/main.c25
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;