283
|
1 module kernel;
|
292
|
2
|
283
|
3 import memory;
|
|
4 import process;
|
292
|
5 import scheduler;
|
|
6 import arch;
|
355
|
7 import io;
|
283
|
8
|
|
9 // Main entry point of the kernel:
|
293
|
10 function void start()
|
283
|
11 {
|
353
|
12 arch.init();
|
362
|
13
|
360
|
14 io.println("Welcome to lcfos!");
|
362
|
15
|
360
|
16 io.print_int(0x1337);
|
|
17 io.print_int(0x1338);
|
|
18 io.print2("Test: ", 0x13);
|
340
|
19
|
360
|
20 var int a;
|
362
|
21 for (a = 0; a < 2; a = a + 1)
|
360
|
22 {
|
362
|
23 //io.print2("a = ", a);
|
360
|
24 }
|
362
|
25
|
|
26 io.print2("PFR0 = ", arch.pfr0());
|
|
27 io.print2("PFR1 = ", arch.pfr1());
|
|
28 io.print2("MMFR0 = ", arch.mmfr0());
|
|
29 io.print2("MPUIR = ", arch.mpuir());
|
|
30
|
357
|
31 // process.init();
|
301
|
32 //memory:init();
|
292
|
33
|
296
|
34 //Process proc = new process:Process();
|
292
|
35
|
296
|
36 //scheduler:queue(proc);
|
340
|
37 while(true) {}
|
283
|
38 }
|
|
39
|
293
|
40 function void panic()
|
283
|
41 {
|
308
|
42 arch.halt();
|
283
|
43 }
|
|
44
|