Mercurial > lcfOS
comparison kernel/src/kernel.c3 @ 364:c49459768aaa
Work on globals
author | Windel Bouwman |
---|---|
date | Wed, 19 Mar 2014 20:24:03 +0100 |
parents | 396e5cefba13 |
children | 98ff43cfdd36 |
comparison
equal
deleted
inserted
replaced
363:396e5cefba13 | 364:c49459768aaa |
---|---|
8 | 8 |
9 var int G; | 9 var int G; |
10 | 10 |
11 function void do() | 11 function void do() |
12 { | 12 { |
13 G = G + 1; | |
13 io.print2("G = ", G); | 14 io.print2("G = ", G); |
14 G = G + 1; | |
15 } | 15 } |
16 | 16 |
17 // Main entry point of the kernel: | 17 // Main entry point of the kernel: |
18 function void start() | 18 function void start() |
19 { | 19 { |
20 G = 0; | 20 G = 0; |
21 arch.init(); | 21 arch.init(); |
22 | 22 |
23 do(); | |
23 io.println("Welcome to lcfos!"); | 24 io.println("Welcome to lcfos!"); |
24 | 25 |
25 do(); | 26 do(); |
26 do(); | 27 do(); |
27 do(); | 28 do(); |
28 do(); | 29 do(); |
29 | 30 |
30 io.print_int(0x1337); | 31 io.print_int(0x1337); |
31 //io.print_int(0x1338); | 32 io.print_int(cast<int>(&G)); |
32 //io.print2("Test: ", 0x13); | 33 //io.print2("Test: ", 0x13); |
33 | 34 |
34 var int a; | 35 var int a; |
35 for (a = 0; a < 2; a = a + 1) | 36 for (a = 0; a < 2; a = a + 1) |
36 { | 37 { |