aboutsummaryrefslogtreecommitdiff
path: root/kernel/prelude/DATS/print.dats
diff options
context:
space:
mode:
authorXander <xander@biltopia.org>2023-08-08 22:17:40 +0200
committerXander <xander@biltopia.org>2023-08-08 22:17:40 +0200
commit245f24890cd78304cf0fd397dda8e72b0a7fbe6b (patch)
tree7210e4d4489b7281fb9213745b4776846402103b /kernel/prelude/DATS/print.dats
parentcef3f6bdddfe768e7a1a84edcec76c11c1634941 (diff)
downloadats-os-245f24890cd78304cf0fd397dda8e72b0a7fbe6b.tar.xz
ats-os-245f24890cd78304cf0fd397dda8e72b0a7fbe6b.zip
more refactoring and implemented exec_init
Diffstat (limited to 'kernel/prelude/DATS/print.dats')
-rw-r--r--kernel/prelude/DATS/print.dats5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/prelude/DATS/print.dats b/kernel/prelude/DATS/print.dats
index ac864ad..c6907a1 100644
--- a/kernel/prelude/DATS/print.dats
+++ b/kernel/prelude/DATS/print.dats
@@ -4,14 +4,15 @@
staload "lib/SATS/writer.sats"
staload "lib/DATS/itoa.dats"
+staload "lib/SATS/panic.sats"
staload UN = "prelude/SATS/unsafe.sats"
extern fun print_newline() :<!wrt> void
implement print_newline() = put_string("\n")
-extern fun assert_errmsg(b: bool, msg: string) :<!wrt> void
-implement assert_errmsg(b,msg) = if (~b) then put_string(msg)
+extern fun assert_errmsg(b: bool, string) :<> void
+implement assert_errmsg(b,loc) = if (~b) then panic_loc(loc,"Assert fail")
extern fun print_int (n : int) :<!wrt> void
implement print_int(n) = put_string(itoa(n,10))