diff options
author | Xander <xander@icth.xyz> | 2023-07-03 14:48:38 +0200 |
---|---|---|
committer | Xander <xander@icth.xyz> | 2023-07-03 14:48:38 +0200 |
commit | 52b6f5d7e03f6918d56f80fab2deaa807d08764a (patch) | |
tree | ce03948769dc34c286d91874e7c4fc8d6e8ff121 /kernel/writer.sats | |
parent | d7df4f130521f6005feda56a15f82eb3bf8597dd (diff) | |
download | ats-os-52b6f5d7e03f6918d56f80fab2deaa807d08764a.tar.xz ats-os-52b6f5d7e03f6918d56f80fab2deaa807d08764a.zip |
Now using static writer
Diffstat (limited to 'kernel/writer.sats')
-rw-r--r-- | kernel/writer.sats | 9 |
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 |