summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jefs.fs1
-rw-r--r--jefs.s19
2 files changed, 13 insertions, 7 deletions
diff --git a/jefs.fs b/jefs.fs
index 172e6d0..e99f82c 100644
--- a/jefs.fs
+++ b/jefs.fs
@@ -1,5 +1,6 @@
\ 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
diff --git a/jefs.s b/jefs.s
index 2a566fd..4c53420 100644
--- a/jefs.s
+++ b/jefs.s
@@ -296,7 +296,7 @@ defword "cparse", cparse, 0
jmp .wordloop
.wordloop_end:
- dec r11
+ ; dec r11
sub r13, qword [tib]
mov qword [to_in], r13
pop r13
@@ -372,13 +372,13 @@ defword "interpret", interpret, 0
; pspop r11
call r15
jmp .loop
- ret ; unreachable safety RET
.interp_n:
call number
pspop r11
+ cmp r11, false
+ je .notfound
jmp .loop
- ret
.compile:
pspop r11
@@ -398,21 +398,26 @@ defword "interpret", interpret, 0
call to_cfa
call compile_comma
jmp .loop
- ret ; unreachable safety RET
.immed_comp:
call to_cfa
pspop r11
call r11
jmp .loop
- ret
.comp_n:
call number
- pspop r11 ; assume its a valid number for now
+ pspop r11
+ cmp r11, false
+ je .notfound
call lit
jmp .loop
- ret
+
+.notfound:
+ mov qword [error], 2
+ mov r8, qword [handler]
+ call r8
+ jmp .loop
.input_over:
call twodrop