Mercurial > lcfOS
comparison kernel/kernel.c3 @ 353:b8ad45b3a573
Started with strings
author | Windel Bouwman |
---|---|
date | Sun, 09 Mar 2014 18:49:10 +0100 |
parents | 899ae3aea803 |
children | 5477e499b039 |
comparison
equal
deleted
inserted
replaced
352:899ae3aea803 | 353:b8ad45b3a573 |
---|---|
6 import arch; | 6 import arch; |
7 | 7 |
8 // Main entry point of the kernel: | 8 // Main entry point of the kernel: |
9 function void start() | 9 function void start() |
10 { | 10 { |
11 arch.init() | 11 arch.init(); |
12 | 12 |
13 print("Welcome to lcfos!"); | |
13 process.init(); | 14 process.init(); |
14 //memory:init(); | 15 //memory:init(); |
15 | 16 |
16 | 17 |
17 //Process proc = new process:Process(); | 18 //Process proc = new process:Process(); |
18 | 19 |
19 //scheduler:queue(proc); | 20 //scheduler:queue(proc); |
20 while(true) {} | 21 while(true) {} |
21 } | 22 } |
22 | 23 |
24 function int strlen(string txt) | |
25 { | |
26 | |
27 } | |
28 | |
29 function int getchar(string txt, int index) | |
30 { | |
31 if (index < strlen(txt)) | |
32 { | |
33 } | |
34 } | |
35 | |
36 function void print(string txt) | |
37 { | |
38 var int i; | |
39 i = 0; | |
40 | |
41 while (i < strlen(txt)) | |
42 { | |
43 arch.putc(getchar(txt, i)); | |
44 i = i + 1; | |
45 } | |
46 } | |
23 | 47 |
24 function void panic() | 48 function void panic() |
25 { | 49 { |
26 arch.halt(); | 50 arch.halt(); |
27 } | 51 } |