diff cos/kernel/kernel.c @ 26:dcce92b1efbc

Added mm.c
author windel
date Tue, 27 Dec 2011 17:36:52 +0100
parents d8627924d40d
children 7f74363f4c82
line wrap: on
line diff
--- a/cos/kernel/kernel.c	Tue Dec 27 13:31:38 2011 +0100
+++ b/cos/kernel/kernel.c	Tue Dec 27 17:36:52 2011 +0100
@@ -20,19 +20,13 @@
    kfree(a);
 }
 
-void reboot()
-{
-   while ( (inb(0x64) & 0x02) == 0x02)
-   {
-      ;
-   }
-   outb(0x64, 0xFE);
-}
+// A test program that prints 'Hoi' to the screen:
+unsigned char hello_program[] = {0x55, 0x48, 0x89, 0xe5, 0x48, 0x83, 0xec, 0x10, 0x48, 0xc7, 0x45, 0xf8, 0x0, 0x80, 0xb, 0x0, 0x48, 0x8b, 0x45, 0xf8, 0xc6, 0x0, 0x48, 0x48, 0x8b, 0x45, 0xf8, 0x48, 0x83, 0xc0, 0x2, 0xc6, 0x0, 0x6f, 0x48, 0x8b, 0x45, 0xf8, 0x48, 0x83, 0xc0, 0x4, 0xc6, 0x0, 0x69, 0xeb, 0xfe, 0x0, 0x14, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x7a, 0x52, 0x0, 0x1, 0x78, 0x10, 0x1, 0x1b, 0xc, 0x7, 0x8, 0x90, 0x1, 0x0, 0x0, 0x1c, 0x0, 0x0, 0x0, 0x1c, 0x0, 0x0, 0x0, 0xb0, 0xff, 0xff, 0xff, 0x2f, 0x0, 0x0, 0x0, 0x0, 0x41, 0xe, 0x10, 0x86, 0x2, 0x43, 0xd, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
 
 void kmain()
 {
   init_screen();
-  setupIDT(); // This causes error on real hardware
+  setupIDT(); 
   init_heap();
 
   printf("Welcome!\n");