summaryrefslogtreecommitdiff
path: root/jefs.s
diff options
context:
space:
mode:
Diffstat (limited to 'jefs.s')
-rw-r--r--jefs.s24
1 files changed, 22 insertions, 2 deletions
diff --git a/jefs.s b/jefs.s
index 71854b4..05598a0 100644
--- a/jefs.s
+++ b/jefs.s
@@ -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