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

Added mm.c
author windel
date Tue, 27 Dec 2011 17:36:52 +0100
parents d8627924d40d
children 7f74363f4c82
comparison
equal deleted inserted replaced
25:d3c4bf3720a3 26:dcce92b1efbc
18 printf("Got b at %x\n", b); 18 printf("Got b at %x\n", b);
19 b[0] = 'B'; 19 b[0] = 'B';
20 kfree(a); 20 kfree(a);
21 } 21 }
22 22
23 void reboot() 23 // A test program that prints 'Hoi' to the screen:
24 { 24 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};
25 while ( (inb(0x64) & 0x02) == 0x02)
26 {
27 ;
28 }
29 outb(0x64, 0xFE);
30 }
31 25
32 void kmain() 26 void kmain()
33 { 27 {
34 init_screen(); 28 init_screen();
35 setupIDT(); // This causes error on real hardware 29 setupIDT();
36 init_heap(); 30 init_heap();
37 31
38 printf("Welcome!\n"); 32 printf("Welcome!\n");
39 33
40 while (1==1) 34 while (1==1)