summaryrefslogtreecommitdiff
path: root/jefs.s
diff options
context:
space:
mode:
authorkitty <nepeta@canaglie.net>2026-02-13 14:49:53 +1100
committerkitty <nepeta@canaglie.net>2026-02-13 14:49:53 +1100
commit936906cdb6c84507d7f5c8418b275eab259cbccc (patch)
tree0da194657f034c3b72c4bb173d90e94bfc4404c7 /jefs.s
parentd99cd40d4c8f513e46e94ec553011f65866c071c (diff)
fix STATE
Diffstat (limited to 'jefs.s')
-rw-r--r--jefs.s27
1 files changed, 7 insertions, 20 deletions
diff --git a/jefs.s b/jefs.s
index d0238ea..3dea971 100644
--- a/jefs.s
+++ b/jefs.s
@@ -70,23 +70,9 @@ umem_e:
section .text
global _start
_start:
- ; mov r11, 0x0409040904090409
; init
mov r14, wstack ; point SP to top
- ; EXPAND BRK
- ; xor rdi, rdi ; brk syscall called with 0 gives the current brk
- ; mov rax, __NR_brk
- ; syscall
- ; mov qword [here], rax
- ; mov qword [h0], rax
- ;
- ; add rax, 0x9c400 ; 640kb, entirely arbitrary
- ; mov rdi, rax
- ; mov rax, __NR_brk
- ; syscall ; if this fails, have fun
- ; mov qword [hend], rax
-
call interpret
mov rdi, 0
mov rax, __NR_exit
@@ -235,6 +221,7 @@ defword "interpret", interpret, 0
ret
.compile:
+ call dots
; handle immediates
pspop r11
cmp r11, false
@@ -249,7 +236,7 @@ defword "interpret", interpret, 0
je .immed_comp
call to_cfa
- ; call dots
+ call dots
pspop r11
call compile_comma
jmp .loop
@@ -257,7 +244,7 @@ defword "interpret", interpret, 0
.immed_comp:
call to_cfa
- ; call dots
+ call dots
pspop r11
call r11
jmp .loop
@@ -341,7 +328,7 @@ defword ":", colon, 0
mov qword [here], r12
pop r12
mov qword [latest], r12
- mov dword [state], compiling
+ mov qword [state], compiling
ret
defword ";", semicolon, immediate_mask
@@ -358,7 +345,7 @@ defword ";", semicolon, immediate_mask
mov byte [r11], 0xc3 ; RET
inc r11
mov qword [here], r11
- mov dword [state], interpreting
+ mov qword [state], interpreting
ret
defword "number", number, 0 ; ( c-addr u -- ?n flag )
@@ -514,11 +501,11 @@ defword "rdrop", rdrop, 0
ret
defword "[", lbrac, immediate_mask
- mov dword [state], interpreting
+ mov qword [state], interpreting
ret
defword "]", rbrac, immediate_mask
- mov dword [state], compiling
+ mov qword [state], compiling
ret
; TEMPORARY HORRIBLE DEBUGGING BULLSHIT {{{