Mercurial > lcfOS
comparison kernel/kernel.c3 @ 354:5477e499b039
Added some sort of string functionality
author | Windel Bouwman |
---|---|
date | Thu, 13 Mar 2014 18:59:06 +0100 |
parents | b8ad45b3a573 |
children | c2ddc8a36f5e |
comparison
equal
deleted
inserted
replaced
353:b8ad45b3a573 | 354:5477e499b039 |
---|---|
19 | 19 |
20 //scheduler:queue(proc); | 20 //scheduler:queue(proc); |
21 while(true) {} | 21 while(true) {} |
22 } | 22 } |
23 | 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) | 24 function void print(string txt) |
37 { | 25 { |
38 var int i; | 26 var int i; |
39 i = 0; | 27 i = 0; |
40 | 28 |
41 while (i < strlen(txt)) | 29 while (i < txt->len) |
42 { | 30 { |
43 arch.putc(getchar(txt, i)); | 31 arch.putc(cast<int>(txt->txt[i])); |
44 i = i + 1; | 32 i = i + 1; |
45 } | 33 } |
46 } | 34 } |
47 | 35 |
48 function void panic() | 36 function void panic() |