summaryrefslogtreecommitdiff
path: root/sanctuary.fs
diff options
context:
space:
mode:
authorkitty <nepeta@canaglie.net>2026-04-22 12:59:16 +1000
committerkitty <nepeta@canaglie.net>2026-04-22 12:59:16 +1000
commite97771961afcfc370f0fb103dc429410ddcd8ad5 (patch)
tree9a6380aa76feb04b3457718ffe5751bf237b0813 /sanctuary.fs
parent1a5dfab8ccc62b806c9abb53940f4e806d76f3da (diff)
move ioctl to io section, .free
Diffstat (limited to 'sanctuary.fs')
-rw-r--r--sanctuary.fs8
1 files changed, 5 insertions, 3 deletions
diff --git a/sanctuary.fs b/sanctuary.fs
index dc2fc8c..6e54b81 100644
--- a/sanctuary.fs
+++ b/sanctuary.fs
@@ -214,6 +214,7 @@ false value nonaming
: sys-write 1 syscall3 ;
: sys-open 2 syscall3 ;
: sys-close 3 syscall1 ;
+: ioctl 16 syscall3 ; \ todo doc
: type swap stdout sys-write drop ;
: warn swap stderr sys-write drop ;
@@ -652,8 +653,6 @@ hex
decimal
\ }}}
-: ioctl 16 syscall3 ;
-
: ESC 27 emit ;
: CSI ESC ." [" ;
@@ -695,8 +694,11 @@ previous definitions
\ }}}
\ todo doc
+: .free bytes-used u. ." of " bytes-allocated u. ." bytes used (" bytes-free (.) type ." free)" cr ;
+
+\ todo doc
0 constant version
: welcome ." sanctuary: a 64 bit forth for linux, version " version u. cr ;
:noname quit ; handler !
-welcome quit bye
+welcome .free quit bye