From 245f24890cd78304cf0fd397dda8e72b0a7fbe6b Mon Sep 17 00:00:00 2001 From: Xander Date: Tue, 8 Aug 2023 22:17:40 +0200 Subject: more refactoring and implemented exec_init --- kernel/prelude/DATS/print.dats | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'kernel/prelude/DATS') 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() : void implement print_newline() = put_string("\n") -extern fun assert_errmsg(b: bool, msg: string) : 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) : void implement print_int(n) = put_string(itoa(n,10)) -- cgit v1.2.3