From b78762c92afee705e618f29f89897db8b45df3dd Mon Sep 17 00:00:00 2001 From: Xander Date: Fri, 28 Jul 2023 21:38:35 +0200 Subject: optional implementation of multboot 1 --- lib/SATS/init.sats | 10 ++++++++-- lib/SATS/writer.sats | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'lib/SATS') diff --git a/lib/SATS/init.sats b/lib/SATS/init.sats index 676657b..8219de1 100644 --- a/lib/SATS/init.sats +++ b/lib/SATS/init.sats @@ -3,6 +3,12 @@ viewtypedef initializable (vt:viewt@ype) = fun {vt:viewt@ype} uninitialized (v : opt(vt,false)): initializable vt -fun {vt:viewt@ype} init_exec (x : &(initializable vt)): void -fun {vt:viewt@ype} init_exec$fwork (v : &vt): void +fun {vt:viewt@ype} exec_void (r: ref(initializable vt)): void +fun {vt:viewt@ype} exec_void$fwork (v : &vt): void + +fun {vt:viewt@ype} {a: t@ype} exec (r: ref(initializable vt), default: a): a +fun {vt:viewt@ype} {a: t@ype} exec$fwork (v : &vt, default: a): a + +fun {vt:viewt@ype} initialize (r: ref(initializable vt)): void +fun {vt:viewt@ype} initialize$fwork (v: &vt? >> opt(vt,success)): #[success : bool] bool success diff --git a/lib/SATS/writer.sats b/lib/SATS/writer.sats index 14773ea..b23213f 100644 --- a/lib/SATS/writer.sats +++ b/lib/SATS/writer.sats @@ -22,5 +22,5 @@ datatype color = typedef screenChar = @{ ascii_character = char, color_code = uint8} -fun put_string (str : string) : void -fun clear_screen() : void +fn put_string (str : string) : void +fn clear_screen() : void -- cgit v1.2.3