summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkitty <nepeta@canaglie.net>2026-03-07 00:23:29 +1100
committerkitty <nepeta@canaglie.net>2026-03-07 00:23:29 +1100
commitab4a8fa9af78dce924673caa6d2c7c991cd98820 (patch)
treefacc10acc16606979460928d3d7da0b1b4203261
parent7a571b75a9cf3d3547d862c7125488006f376e2c (diff)
modrm,
i dont know if this is actually writing the instruction correct (or at all) i should work on dump
-rw-r--r--jefs.fs4
1 files changed, 2 insertions, 2 deletions
diff --git a/jefs.fs b/jefs.fs
index 9d774c0..e63de61 100644
--- a/jefs.fs
+++ b/jefs.fs
@@ -155,11 +155,11 @@ variable disp
: /2 modrm @ 10 or modrm ! ; : /3 modrm @ 18 or modrm ! ;
: /4 modrm @ 20 or modrm ! ; : /5 modrm @ 28 or modrm ! ;
: /6 modrm @ 30 or modrm ! ; : /7 modrm @ 38 or modrm ! ;
-: modrm, ; \ TODO
+: modrm, modrm @ c, disp @ ?dup 0<> if c, then ;
\ TODO store and write the displacement if given
: mod0 modrm @ 3f and modrm ! ;
-: d) disp ! mod0 0<> if modrm @ 40 or modrm ! then ; \ disp8 or 0 only for now
+: d) dup disp ! ( mod0 ) 0<> if modrm @ 40 or modrm ! then ; \ disp8 or 0 only for now
: mov, rex, 8b c, modrm @ c, asm$ ;