blob: c9b88145b50c138c45ec92a60d628d5a236a26cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#define N 80 * 25
datatype color =
| Black
| Blue
| Green
| Cyan
| Red
| Magenta
| Brown
| LightGray
| DarkGray
| LightBlue
| LightGreen
| LightCyan
| LightRed
| Pink
| Yellow
| White
typedef screenChar = @{ ascii_character = char, color_code = uint8}
vtypedef tptr (a: t@ype, l:addr) = (a @ l | ptr l)
vtypedef writer = [l: addr] [n:nat | n < N] @{ column_position = size_t n, color_code = uint8 , buffer = tptr(@[screenChar][N],l)}
fun print_char(c : char) : void
|