summaryrefslogtreecommitdiff
path: root/jefs.s
diff options
context:
space:
mode:
Diffstat (limited to 'jefs.s')
-rw-r--r--jefs.s15
1 files changed, 13 insertions, 2 deletions
diff --git a/jefs.s b/jefs.s
index fffec83..c34dc7d 100644
--- a/jefs.s
+++ b/jefs.s
@@ -206,14 +206,25 @@ defword "find", find, 0
; stage 1 interpreter, just reads from initfile
defword "interpret", interpret, 0
.loop:
+; todo interact with state
call parse
call find
- pspop r11 ; assume it exists for testing
+ pspop r11 ; assume it exists its fine for now
call to_cfa
+ mov r12, qword [state]
+ cmp r12, interpreting
+ je .interp
+
+.compile:
+ pspop r11
+ call compile_comma,
+ ret ; unreachable safety RET
+
+.interp:
pspop r11
call r11
jmp .loop
- ret
+ ret ; unreachable safety RET
defword ">cfa", to_cfa, 0
pspop r11