summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--jefs.s8
2 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 72f7701..d20ec79 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,8 @@
TARGET := jefs
SRCS = $(TARGET).s
+all: $(TARGET) $(TARGET).fs
+
$(TARGET): $(TARGET).o
ld --omagic -static -o $@ $<
diff --git a/jefs.s b/jefs.s
index 19e93d7..484c7b9 100644
--- a/jefs.s
+++ b/jefs.s
@@ -138,6 +138,7 @@ defword "parse", parse, 0
jmp .wordloop
.wordloop_end:
+ dec r11
sub r13, initfile
mov qword [to_in], r13
pop r13
@@ -167,6 +168,7 @@ defword "find", find, 0
mov rsi, r13
add rsi, 2
mov rdi, r11
+ mov rcx, r10
repz cmpsb
jnz .no
sub r13, 9
@@ -192,6 +194,12 @@ defword "interpret", interpret, 0
call find
pspop r11 ; for testing
pspop r11
+ add r11, 9
+ xor r12, r12
+ mov r12w, word [r11]
+ add r11, 2
+ add r11, r12
+ inc r11
call r11
ret