summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkitty <nepeta@canaglie.net>2026-03-07 14:36:26 +1100
committerkitty <nepeta@canaglie.net>2026-03-07 14:36:26 +1100
commit96f6b7ef59073edd98edb82e3599f28d664c3857 (patch)
treef7bb4f439f3392d29dd170f11e0f608a4d216eb5
parentacf7ba361df4f88cde4426bcf6ec111e0d73db3d (diff)
asm: write displacement
-rw-r--r--jefs.fs4
1 files changed, 2 insertions, 2 deletions
diff --git a/jefs.fs b/jefs.fs
index 54747f6..7da7cce 100644
--- a/jefs.fs
+++ b/jefs.fs
@@ -157,11 +157,11 @@ variable disp
: /6 modrm @ 30 or modrm ! ; : /7 modrm @ 38 or modrm ! ;
: modrm, modrm @ c, disp @ ?dup 0<> if c, then ;
-\ TODO store and write the displacement if given
: mod0 modrm @ 3f and modrm ! ;
: d) dup disp ! ( mod0 ) 0<> if modrm @ 40 or modrm ! then ; \ disp8 or 0 only for now
+: disp, disp @ ?dup 0<> if c, then ;
-: mov, rex, 8b c, modrm @ c, asm$ ;
+: mov, rex, 8b c, modrm @ c, disp, asm$ ;
\ example idea: (from execute below)
\ rex.w r11, r14 0 d) mov,