diff options
Diffstat (limited to 'jefs.s')
| -rw-r--r-- | jefs.s | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -117,6 +117,14 @@ defword ",", comma, 0 mov qword [here], r12 ret +defword "d,", d_comma, 0 + pspop r11 + mov r12, [here] + mov dword [r12], r11d + add r12, 4 + mov qword [here], r12 + ret + defword "w,", w_comma, 0 pspop r11 mov r12, [here] @@ -543,8 +551,8 @@ defword "+", plus, 0 defword "-", minus, 0 pspop r11 pspop r12 - sub r11, r12 - pspush r11 + sub r12, r11 + pspush r12 ret defword "*", _times, 0 @@ -616,6 +624,18 @@ defword "immediate", immediate, 0 mov byte [r12], r13b 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 + mov r12, [here] + mov byte [r12], 0xe9 + inc r12 + mov qword [here], r12 + ret + +; defword "0branch", zerobranch, 0 +; ret + ; TEMPORARY HORRIBLE DEBUGGING BULLSHIT {{{ ; debugging word; outputs raw bytes so needs to be piped through `x(x)d` ; terrible and awful |
