diff options
| -rw-r--r-- | jefs.s | 13 | ||||
| -rw-r--r-- | readme.md | 3 |
2 files changed, 16 insertions, 0 deletions
@@ -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 @@ -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>` |
