comparison kernel/kernel.c3 @ 355:c2ddc8a36f5e

Enabled optimization
author Windel Bouwman
date Fri, 14 Mar 2014 10:30:13 +0100
parents 5477e499b039
children 52492b304adf
comparison
equal deleted inserted replaced
354:5477e499b039 355:c2ddc8a36f5e
2 2
3 import memory; 3 import memory;
4 import process; 4 import process;
5 import scheduler; 5 import scheduler;
6 import arch; 6 import arch;
7 import io;
7 8
8 // Main entry point of the kernel: 9 // Main entry point of the kernel:
9 function void start() 10 function void start()
10 { 11 {
11 arch.init(); 12 arch.init();
12 13
13 print("Welcome to lcfos!"); 14 io.print("Welcome to lcfos!");
14 process.init(); 15 process.init();
15 //memory:init(); 16 //memory:init();
16 17
17 18
18 //Process proc = new process:Process(); 19 //Process proc = new process:Process();
19 20
20 //scheduler:queue(proc); 21 //scheduler:queue(proc);
21 while(true) {} 22 while(true) {}
22 } 23 }
23 24
24 function void print(string txt)
25 {
26 var int i;
27 i = 0;
28
29 while (i < txt->len)
30 {
31 arch.putc(cast<int>(txt->txt[i]));
32 i = i + 1;
33 }
34 }
35
36 function void panic() 25 function void panic()
37 { 26 {
38 arch.halt(); 27 arch.halt();
39 } 28 }
40 29