diff options
| author | kitty <nepeta@canaglie.net> | 2026-02-14 02:02:06 +1100 |
|---|---|---|
| committer | kitty <nepeta@canaglie.net> | 2026-02-14 02:02:06 +1100 |
| commit | a617499f8472c7ad4e12ff77709448814c5513ec (patch) | |
| tree | 4446762c9576fb9406fad63a8041ef1bdcefd127 | |
| parent | 8e533a658a6151c108220a9cc34b5f2c8af75819 (diff) | |
makefile fix, arithmetic
| -rw-r--r-- | Makefile | 4 | ||||
| -rw-r--r-- | jefs.s | 21 |
2 files changed, 23 insertions, 2 deletions
@@ -1,12 +1,12 @@ TARGET := jefs SRCS = $(TARGET).s -all: $(TARGET) $(TARGET).fs +all: $(TARGET) $(TARGET): $(TARGET).o ld --omagic -static -o $@ $< -$(TARGET).o: $(SRCS) +$(TARGET).o: $(SRCS) $(TARGET).fs nasm -g -F dwarf -O0 -f elf64 -o $@ $< .PHONY: clean @@ -533,6 +533,27 @@ defword "rdrop", rdrop, 0 pop r11 ret +defword "+", plus, 0 + pspop r11 + pspop r12 + add r11, r12 + pspush r11 + ret + +defword "-", minus, 0 + pspop r11 + pspop r12 + sub r11, r12 + pspush r11 + ret + +defword "*", timess, 0 + pspop r11 + pspop r12 + imul r11, r12 + pspush r11 + ret + defword "[", lbrac, immediate_mask mov qword [state], interpreting ret |
