summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jefs.fs2
-rw-r--r--jefs.s27
2 files changed, 8 insertions, 21 deletions
diff --git a/jefs.fs b/jefs.fs
index ac047e5..372f0cb 100644
--- a/jefs.fs
+++ b/jefs.fs
@@ -1,3 +1,3 @@
-: test parse bye find drop >cfa compile, ;
+: test bye ;
HEREDUMP
test
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 {{{