aboutsummaryrefslogtreecommitdiff
path: root/kernel/writer.sats
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/writer.sats')
-rw-r--r--kernel/writer.sats9
1 files changed, 6 insertions, 3 deletions
diff --git a/kernel/writer.sats b/kernel/writer.sats
index 43881b1..e6baef5 100644
--- a/kernel/writer.sats
+++ b/kernel/writer.sats
@@ -1,4 +1,4 @@
-#define N 2000
+#define N 80 * 25
datatype color =
| Black
@@ -21,6 +21,9 @@ datatype color =
typedef screenChar = @{ ascii_character = char, color_code = uint8}
-vtypedef writer = [l : agz] @{position = [a:int | a >= 0 && a < N] int (a), color_code = uint8 , buffer = (@[screenChar][N] @ l | ptr l)}
+vtypedef buffer = [l : agz] (@[screenChar][N] @ l | ptr l)
+typedef writer = @{position = [a:int | a >= 0 && a < N] int (a), color_code = uint8}
-fun print_char(c : char) : void
+castfn i2u8 {n: nat} (i: int n): uint8 n
+
+fun put_string (str : string) : void