aboutsummaryrefslogtreecommitdiff
path: root/kernel/output/print.dats
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/output/print.dats')
-rw-r--r--kernel/output/print.dats15
1 files changed, 15 insertions, 0 deletions
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)