~vdupras/duskos

c4b329a213197d324932a98eb082b3462bf339ad — Virgil Dupras a month ago 3ac5393
asm/i386: add lea,
3 files changed, 5 insertions(+), 1 deletions(-)

M fs/asm/i386.fs
M fs/doc/asm/i386.txt
M fs/tests/asm/i386.fs
M fs/asm/i386.fs => fs/asm/i386.fs +1 -0
@@ 199,6 199,7 @@ create _tbl $8c , $120 , $121 , $124 ,
    drop dup indirect? if $c600 or opmod, else _shortimm then
    else $8800 _regular, then ;

: lea, swap $8d00 _regular, ;
: int, ( n -- ) $cd c, c, ;

\ Jumps and relative addresses

M fs/doc/asm/i386.txt => fs/doc/asm/i386.txt +1 -1
@@ 133,7 133,7 @@ only) operand.
add,     or,       adc,      sbb,
and,     sub,      xor,      cmp,
test,    xchg,
mov,
mov,     lea,

### Shift instructions ( dst shiftby -- )


M fs/tests/asm/i386.fs => fs/tests/asm/i386.fs +3 -0
@@ 166,6 166,9 @@ here ax 16b) dx in, 2 chk
here 3 nc, $f6 $00 $80
here ax 0 d) 8b) $80 i) test, 3 chk

here 4 nc, $8d $44 $24 $2a
here ax sp 42 d) lea, 4 chk

1 to realmode
here 2 nc, $8a $04
here al 0 si+) mov, 2 chk