283
|
1 module kernel;
|
292
|
2
|
283
|
3 import memory;
|
|
4 import process;
|
292
|
5 import scheduler;
|
|
6 import arch;
|
283
|
7
|
|
8 // Main entry point of the kernel:
|
293
|
9 function void start()
|
283
|
10 {
|
353
|
11 arch.init();
|
340
|
12
|
353
|
13 print("Welcome to lcfos!");
|
308
|
14 process.init();
|
301
|
15 //memory:init();
|
292
|
16
|
|
17
|
296
|
18 //Process proc = new process:Process();
|
292
|
19
|
296
|
20 //scheduler:queue(proc);
|
340
|
21 while(true) {}
|
283
|
22 }
|
|
23
|
353
|
24 function void print(string txt)
|
|
25 {
|
|
26 var int i;
|
|
27 i = 0;
|
|
28
|
354
|
29 while (i < txt->len)
|
353
|
30 {
|
354
|
31 arch.putc(cast<int>(txt->txt[i]));
|
353
|
32 i = i + 1;
|
|
33 }
|
|
34 }
|
283
|
35
|
293
|
36 function void panic()
|
283
|
37 {
|
308
|
38 arch.halt();
|
283
|
39 }
|
|
40
|