comparison kernel/src/kernel.c3 @ 367:577ed7fb3fe4

Try to make thumb work again
author Windel Bouwman
date Fri, 21 Mar 2014 10:27:57 +0100
parents 98ff43cfdd36
children 6df89163e114
comparison
equal deleted inserted replaced
366:39bf68bf1891 367:577ed7fb3fe4
4 import process; 4 import process;
5 import scheduler; 5 import scheduler;
6 import arch; 6 import arch;
7 import io; 7 import io;
8 8
9 var int G;
10
11 function void do()
12 {
13 G = G + 1;
14 io.print2("G = ", G);
15 }
16
17 // Main entry point of the kernel: 9 // Main entry point of the kernel:
18 function void start() 10 function void start()
19 { 11 {
20 G = 0;
21 arch.init(); 12 arch.init();
22 13
23 io.println("Welcome to lcfos!"); 14 io.println("Welcome to lcfos!");
24 15
25 do();
26 do();
27 do();
28 io.println("Welcome 2!");
29 do();
30 do();
31
32 io.print_int(0x1337);
33 io.print_int(cast<int>(&G));
34 //io.print2("Test: ", 0x13);
35
36 var int a;
37 for (a = 0; a < 2; a = a + 1)
38 {
39 io.print2("a = ", a);
40 }
41
42 io.print2("PFR0 = ", arch.pfr0());
43 io.print2("PFR1 = ", arch.pfr1());
44 io.print2("MMFR0 = ", arch.mmfr0());
45 // io.print2("MPUIR = ", arch.mpuir());
46
47 // process.init(); 16 // process.init();
48 //memory:init(); 17 memory.init();
49 18
50 //Process proc = new process:Process(); 19 //Process proc = new process:Process();
51 20
52 //scheduler:queue(proc); 21 //scheduler:queue(proc);
53 while(true) {} 22 while(true) {}
54 } 23 }
55 24
25 // Called in total stress:
56 function void panic() 26 function void panic()
57 { 27 {
58 arch.halt(); 28 arch.halt();
59 } 29 }
60 30