From 8afcd437c0b2b02c255d83d87e63a88b240d27a1 Mon Sep 17 00:00:00 2001 From: kitty Date: Tue, 24 Feb 2026 21:22:25 +1100 Subject: wtf moving the stack after the user memory has entirely fixed the problem i dont understand --- jefs.fs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'jefs.fs') 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 -- cgit v1.2.3