summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jefs.s13
-rw-r--r--readme.md3
2 files changed, 16 insertions, 0 deletions
diff --git a/jefs.s b/jefs.s
index 9ae577b..ae0a80c 100644
--- a/jefs.s
+++ b/jefs.s
@@ -551,6 +551,10 @@ defword "lit", lit, immediate_mask ; C: ( n -- ) ( -- n )
mov qword [here], r12
ret
+defword "litstring", litstring, immediate_mask ; I: ( chr -- )
+ pspop r11
+ ret
+
defword "syscall0", syscall0, 0 ; ( id -- rax )
pspop rax
syscall
@@ -802,6 +806,15 @@ defword "smudge", smudge, 0 ; TOGGLES it (follows fig-forth but i kinda dont lik
mov byte [r12], r13b
ret
+defword "char", char, 0
+ call parse
+ call drop
+ pspop r12
+ xor r11, r11
+ mov r11b, [r12]
+ pspush r11
+ ret
+
; e9 [00 00 00 00] relative 32 bit immediate, relative to *instruction after jump*!
; note: the dummy value must be provided *by the calling word*
defword "branch", branch, 0
diff --git a/readme.md b/readme.md
index e02280c..caca7ae 100644
--- a/readme.md
+++ b/readme.md
@@ -61,3 +61,6 @@ the forth `<BUILDS` which i've never heard of elsewhere. in fact if i look up
`forth "<BUILDS"` on duckduckgo that link is the only result.
i debased myself and looked it up on google too, and found a few more results
maybe i can do something with that because i like `DOES>` and i wanna use it
+
+maybe this sucks shit but my idea is that i compile in a relative jmp with
+`<BUILDS` and fill it in with `DOES>`