comparison user/screen.c3 @ 315:084cccaa5deb

Added console and screen
author Windel Bouwman
date Sat, 21 Dec 2013 10:03:01 +0100
parents
children
comparison
equal deleted inserted replaced
314:38f5f298ce0e 315:084cccaa5deb
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