summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkitty <nepeta@canaglie.net>2026-02-26 19:13:24 +1100
committerkitty <nepeta@canaglie.net>2026-02-26 19:13:24 +1100
commit59f9514eb8324926cc73e2ebc28f234afac1d4fd (patch)
tree0f8cdf4fd0f689e6d090a40ff0c76effa7a50cf0
parent738d7ffb609ff26b6331a5da62cd1fe565fce71d (diff)
don't interpret "
also fixes the Leaving shit on the stack issue. i still dont know what that's about but i just `drop` it and its fixed
-rw-r--r--jefs.fs6
-rw-r--r--jefs.s3
2 files changed, 5 insertions, 4 deletions
diff --git a/jefs.fs b/jefs.fs
index e99f82c..ba2aae6 100644
--- a/jefs.fs
+++ b/jefs.fs
@@ -1,6 +1,5 @@
\ i think something is going on with the stack. i dunno
\ things TODO:
-\ NEXT: ." while it works then leaves PARSE to pick up the end quote.
\ EVALUATE
\ CASE
\ DO LOOP
@@ -56,7 +55,7 @@ hex : ret, c3 c, ; decimal
\ TODO interpret mode strings?
\ : s" [ char " ] literal 1 >in +! ( skip spc ) [compile] litstring ; immediate
-: s" 1 >in +! [ char " ] literal cparse branch >mark >r 2dup cmove, r> >resolve swap [compile] lit [compile] lit ; immediate
+: s" 1 >in +! [ char " ] literal cparse branch >mark >r 2dup cmove, r> >resolve swap [compile] lit [compile] lit drop ; immediate
: ." [compile] s" ' say compile, ; immediate \ lol this word breaks the highlighting, here have another "
\ https://wiki.osdev.org/X86-64_Instruction_Encoding
@@ -185,9 +184,10 @@ variable hld
\ TODO fix/rewrite interpreter to respect #tib
\ : (evaluate) ( c-addr u -- ) .s 0 >in ! ( u ) #tib ! ( c-addr ) tib ! interpret ;
-: (evaluate) ( c-addr u -- ) .s 2drop ;
+: (evaluate) ( c-addr u -- ) 2drop ;
: evaluate ( c-addr u -- ) >r >r tib @ #tib @ >in @ r> r> (evaluate) >in ! #tib ! tib ! ;
+.s
TESTSTR evaluate
.free
bye
diff --git a/jefs.s b/jefs.s
index 4c53420..78154cf 100644
--- a/jefs.s
+++ b/jefs.s
@@ -296,7 +296,8 @@ defword "cparse", cparse, 0
jmp .wordloop
.wordloop_end:
- ; dec r11
+ dec r11
+ inc r13
sub r13, qword [tib]
mov qword [to_in], r13
pop r13