From 415f75c275c991949ef7c9d2c62d07e8eba761b5 Mon Sep 17 00:00:00 2001 From: Xander Date: Tue, 4 Jul 2023 13:26:09 +0200 Subject: Overloading print + cleanup --- kernel/output/print.dats | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 kernel/output/print.dats (limited to 'kernel/output/print.dats') diff --git a/kernel/output/print.dats b/kernel/output/print.dats new file mode 100644 index 0000000..22fe575 --- /dev/null +++ b/kernel/output/print.dats @@ -0,0 +1,15 @@ +#include "share/atspre_staload.hats" + +#define ATS_DYNLOADFLAG 0 + +staload "kernel/output/writer.sats" + +extern fun print_newline() : void +implement print_newline() : void = put_string("\n") + +extern fun assert_errmsg(b: bool, msg: string) : void +implement assert_errmsg(b: bool, msg: string) : void = put_string(msg) + +overload print with put_string of 1 + +macdef assertloc(tf) = assert_errmsg (,(tf), $mylocation) -- cgit v1.2.3