summaryrefslogtreecommitdiff
path: root/jefs.fs
diff options
context:
space:
mode:
authorkitty <nepeta@canaglie.net>2026-02-24 21:22:25 +1100
committerkitty <nepeta@canaglie.net>2026-02-24 21:22:25 +1100
commit8afcd437c0b2b02c255d83d87e63a88b240d27a1 (patch)
tree107c5c18c5c9889d6887bbeaa9e5a0f609acb594 /jefs.fs
parent7f577ebad6f135e2169c25deb8f3ca7bf91a9e50 (diff)
wtf
moving the stack after the user memory has entirely fixed the problem i dont understand
Diffstat (limited to 'jefs.fs')
-rw-r--r--jefs.fs13
1 files changed, 3 insertions, 10 deletions
diff --git a/jefs.fs b/jefs.fs
index e056cf7..cd605c1 100644
--- a/jefs.fs
+++ b/jefs.fs
@@ -154,23 +154,16 @@ variable hld
: .qword (.qword) say space ;
: ? @ . ;
-: .s sp 8 + ( skip sp itself ) begin dup s0 @ > while dup @ .qword 8 + repeat drop cr ;
+: .s sp 8 + ( skip sp itself ) begin dup s0 @ >= while dup @ .qword 8 + repeat drop cr ;
: bytes-allocated hend @ h0 @ - ;
: bytes-used here @ h0 @ - ;
: bytes-free bytes-allocated bytes-used - ;
-\ there is some issue with ." that causes a segfault. strange
-\ it seems to happen if multiple strings appear.
-\ purrhaps something isn't being reset??
-\ it only seems to happen if the called word is a builtin or a number?????
-\ : .free bytes-free u. ." of " bytes-allocated u. ." bytes free (used " bytes-used (.) say ." )" cr ; \ segfaults
+: .free bytes-free u. ." of " bytes-allocated u. ." bytes free (used " bytes-used (.) say ." )" cr ;
: >nfa ( lfa -- nfa ) 9 + ;
: >ffa ( lfa -- ffa ) 8 + ;
: (words) ( lfa -- ) >nfa dup w@ swap 2 + swap say 2 spaces ;
: words latest @ begin ?dup 0<> while dup (words) @ repeat cr ;
-\ .free bye
-\ : t s" eue eu eo o eu" ; \ s" eue " [ HEREDUMP ] ;
-
-\ words
+.free
bye