Mercurial > lcfOS
annotate user/screen.c3 @ 360:42343d189e14
Bugfix in for loop
author | Windel Bouwman |
---|---|
date | Fri, 14 Mar 2014 16:11:32 +0100 |
parents | 084cccaa5deb |
children |
rev | line source |
---|---|
315 | 1 module screen; |
2 | |
3 import ipc; | |
4 | |
5 const int num_cols = 80; | |
6 const int num_rows = 25; | |
7 | |
8 var int* vidmem; | |
9 | |
10 function void clear() | |
11 { | |
12 var int row, col; | |
13 | |
14 for (row = 0; row < num_rows; rows++) | |
15 { | |
16 for (col = 0; col < num_cols; cols=cols+1) | |
17 { | |
18 *vidmem = 0x20; | |
19 } | |
20 } | |
21 } | |
22 | |
23 function void main() | |
24 { | |
25 // Initialize display | |
26 | |
27 clear(); | |
28 | |
29 while (true) | |
30 { | |
31 var ipc.Msg msg; | |
32 ipc.receive_message(&msg); | |
33 } | |
34 } | |
35 |