aboutsummaryrefslogtreecommitdiff
path: root/kernel/prelude/DATS
diff options
context:
space:
mode:
authorXander <xander@biltopia.org>2023-07-21 21:36:54 +0200
committerXander <xander@biltopia.org>2023-07-21 21:36:54 +0200
commit1d25d9783127c181f79732eb5c20c680444af414 (patch)
tree5550f40b25af3e2722b5aaf6194f6df37ca9e092 /kernel/prelude/DATS
parent9226c8bb581c363a552998663704c483f35f6aae (diff)
downloadats-os-1d25d9783127c181f79732eb5c20c680444af414.tar.xz
ats-os-1d25d9783127c181f79732eb5c20c680444af414.zip
Mainly refactoring
Diffstat (limited to 'kernel/prelude/DATS')
-rw-r--r--kernel/prelude/DATS/print.dats4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/prelude/DATS/print.dats b/kernel/prelude/DATS/print.dats
index c6cd220..b183da5 100644
--- a/kernel/prelude/DATS/print.dats
+++ b/kernel/prelude/DATS/print.dats
@@ -34,6 +34,9 @@ implement print_size_t (n) = put_string(itoa($UN.cast{int}(n),10))
extern fun print_uint (n : uint) : void
implement print_uint (n) = put_string(itoa($UN.cast{int}(n),10))
+extern fun print_addr (n : Ptr) : void
+implement print_addr (n) = put_string(itoa($UN.cast{int}(n),10))
+
overload print with put_string of 1
overload print with print_int of 1
overload print with print_uint32 of 1
@@ -42,6 +45,7 @@ overload print with print_uint16 of 1
overload print with print_uint8 of 1
overload print with print_size_t of 1
overload print with print_uint of 1
+overload print with print_addr of 1
extern fun {a : t@ype} println_base {n:nat | n > 1 && n < 33} (n :a, base : int n) : void
implement{a} println_base(n,base) = println!(itoa($UN.cast{int}(n), base))