diff options
author | Xander <xander@biltopia.org> | 2023-07-21 21:36:54 +0200 |
---|---|---|
committer | Xander <xander@biltopia.org> | 2023-07-21 21:36:54 +0200 |
commit | 1d25d9783127c181f79732eb5c20c680444af414 (patch) | |
tree | 5550f40b25af3e2722b5aaf6194f6df37ca9e092 /kernel/prelude | |
parent | 9226c8bb581c363a552998663704c483f35f6aae (diff) | |
download | ats-os-1d25d9783127c181f79732eb5c20c680444af414.tar.xz ats-os-1d25d9783127c181f79732eb5c20c680444af414.zip |
Mainly refactoring
Diffstat (limited to 'kernel/prelude')
-rw-r--r-- | kernel/prelude/DATS/print.dats | 4 |
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)) |