From 99b0d29d403a3f57db8760282be6acbb6c8fe532 Mon Sep 17 00:00:00 2001 From: kitty Date: Wed, 25 Feb 2026 00:35:54 +1100 Subject: incomplete assembler displacement --- jefs.fs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'jefs.fs') diff --git a/jefs.fs b/jefs.fs index cd605c1..3119591 100644 --- a/jefs.fs +++ b/jefs.fs @@ -66,6 +66,8 @@ variable modrm : rex.r rex @ 44 or rex ! ; : rex.x rex @ 42 or rex ! ; : rex.b rex @ 41 or rex ! ; +: rex, rex @ ?dup if c, then ; + \ REGISTERS {{{ : rax modrm @ 0 or modrm ! ; : rcx modrm @ 1 or modrm ! ; @@ -92,6 +94,12 @@ variable modrm : /4 modrm @ 20 or modrm ! ; : /5 modrm @ 28 or modrm ! ; : /6 modrm @ 30 or modrm ! ; : /7 modrm @ 38 or modrm ! ; +\ TODO store and write the displacement if given +: mod0 modrm @ 3f and modrm ! ; +: d) mod0 0<> if modrm @ 40 or modrm ! then ; \ disp8 or 0 only for now + +: mov, rex, 8b c, modrm @ c, asm$ ; + \ example idea: (from execute below) \ rex.w r11, r14 0 d) mov, \ rex.w r14, r14 8 d) lea, -- cgit v1.2.3