summaryrefslogtreecommitdiff
path: root/jefs.fs
diff options
context:
space:
mode:
authorkitty <nepeta@canaglie.net>2026-02-21 01:30:51 +1100
committerkitty <nepeta@canaglie.net>2026-02-21 01:30:51 +1100
commit8ea14c863401f19e602132192e2b8d776669ce5d (patch)
tree2604f3bcafd0db17f11bea84d565cedc3a905a17 /jefs.fs
parent734c5c4430d488fc78dca791643ac6f1431c24c1 (diff)
hex dpy words, .s in forth!
Diffstat (limited to 'jefs.fs')
-rw-r--r--jefs.fs14
1 files changed, 12 insertions, 2 deletions
diff --git a/jefs.fs b/jefs.fs
index 2bfbcfb..b5d2cc2 100644
--- a/jefs.fs
+++ b/jefs.fs
@@ -56,7 +56,6 @@ decimal
\ PNO
\ mostly from pforth
-
255 allot variable pad drop
variable hld
: <# pad hld ! ;
@@ -69,9 +68,20 @@ variable hld
: (u.) <# #s #> ;
: u. (u.) say space ;
: u.r >r (u.) r> over - spaces say ;
+
: (.) dup abs <# #s swap sign #> ;
: . (.) say space ;
: .r >r (.) r> over - spaces say ;
-\ TODO something is leaking its stack (a word address i think)
+: (.byte) hex <# # # #> decimal ;
+: .byte (.byte) say space ;
+: (.word) hex <# # # # # #> decimal ;
+: .word (.word) say space ;
+: (.dword) hex <# # # # # # # # # #> decimal ;
+: .dword (.dword) say space ;
+: (.qword) hex <# # # # # # # # # # # # # # # # # #> decimal ;
+: .qword (.qword) say space ;
+
+: .s sp 8 + ( skip sp itself ) begin dup s0 @ >= while dup @ .qword 8 + repeat drop cr ;
+
bye