summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkitty <nepeta@canaglie.net>2026-02-08 15:53:35 +1100
committerkitty <nepeta@canaglie.net>2026-02-08 15:53:35 +1100
commit14ef00273e2857a8d68b5bd4c542e3d9d82582d7 (patch)
treeafd61baa8ed44c9cfa9a3da98119aee99b3601ca
parent2dec249cc7a07bb241bc0611f82e723030d3e30c (diff)
i believe it now passes PARSE
-rw-r--r--Makefile2
-rw-r--r--jefs.fs1
-rw-r--r--jefs.s11
3 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index ff03bbf..72f7701 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ TARGET := jefs
SRCS = $(TARGET).s
$(TARGET): $(TARGET).o
- ld -static -o $@ $<
+ ld --omagic -static -o $@ $<
$(TARGET).o: $(SRCS)
nasm -g -F dwarf -O0 -f elf64 -o $@ $<
diff --git a/jefs.fs b/jefs.fs
index e69de29..b023018 100644
--- a/jefs.fs
+++ b/jefs.fs
@@ -0,0 +1 @@
+bye
diff --git a/jefs.s b/jefs.s
index 806e3b2..19e93d7 100644
--- a/jefs.s
+++ b/jefs.s
@@ -21,8 +21,8 @@
%define mac_latest lfa_%2
ffa_%2: db %3 ; FFA
nfa_%2: dw slen ; NFA
- db 0
db %1
+ db 0
%endmacro
%macro defword 3
@@ -68,6 +68,7 @@ _start:
; init
mov r14, wstack ; point SP to top
+ call interpret
mov rdi, 0
mov rax, __NR_exit
syscall
@@ -186,9 +187,15 @@ defword "find", find, 0
; stage 1 interpreter, just reads from initfile
defword "interpret", interpret, 0
+.loop:
+ call parse
+ call find
+ pspop r11 ; for testing
+ pspop r11
+ call r11
ret
-defvar ">in", to_in, 0, initfile
+defvar ">in", to_in, 0, 0
defvar "latest", latest, 0, lfa_latest
initfile: