aboutsummaryrefslogtreecommitdiff
path: root/kernel/writer.sats
diff options
context:
space:
mode:
authorXander <xander@icth.xyz>2023-07-03 14:48:38 +0200
committerXander <xander@icth.xyz>2023-07-03 14:48:38 +0200
commit52b6f5d7e03f6918d56f80fab2deaa807d08764a (patch)
treece03948769dc34c286d91874e7c4fc8d6e8ff121 /kernel/writer.sats
parentd7df4f130521f6005feda56a15f82eb3bf8597dd (diff)
downloadats-os-52b6f5d7e03f6918d56f80fab2deaa807d08764a.tar.xz
ats-os-52b6f5d7e03f6918d56f80fab2deaa807d08764a.zip
Now using static writer
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