@@ 297,7 297,11 @@ op &, and, op |, or, op ^, xor,
dup imm? not if cx swap mov, cl then | execute ;
op <<, shl, op >>, shr,
-: [+n], ( n halop -- ) halop>dstsrc nip swap i) add, ;
+: [+n], ( n halop -- )
+ halop>dstsrc nip swap case ( op )
+ 1 of = inc, endof
+ -1 of = dec, endof
+ r@ i) add, endcase ;
: _ ( halop -- dst src )
dup 16b? >r dup 8b? >r 32b)
halop>dstsrc bx swap mov, ( dst )
@@ 205,10 205,14 @@ xcode LIT>W, ( n -- ) \ ax XX i) mov,
xcode LIT>A, ( n -- ) \ di XX i) mov,
$bf i) cwrite, L1 absjmp,
-xcode W+n, ( n -- ) \ ax XX i) add,
+xcode W+n, ( n -- ) \ ax XX i) add, OR ax inc,/dec,
+ ax 1 i) cmp, forward8 jnz, $40 i) cwrite, xdrop, ret, forward!
+ ax -1 i) cmp, forward8 jnz, $48 i) cwrite, xdrop, ret, forward!
$05 i) cwrite, L1 absjmp,
-xcode A+n, ( n -- ) \ di XX i) add,
+xcode A+n, ( n -- ) \ di XX i) add, OR di inc,/dec,
+ ax 1 i) cmp, forward8 jnz, $47 i) cwrite, xdrop, ret, forward!
+ ax -1 i) cmp, forward8 jnz, $4f i) cwrite, xdrop, ret, forward!
$c781 i) wwrite, L1 absjmp,
xcode W>A, ( n -- ) \ di ax mov,
@@ 271,7 275,9 @@ xcode [!], ( operand -- )
al $03 i) mov, \ keep size, but modrm is for bx 0 d) ax mov,
L1 absjmp,
-xcode [+n], ( n operand -- ) \ operand n i) add,
+xcode [+n], ( n operand -- ) \ operand n i) add, OR operand inc,/dec,
+ si 0 d) 1 i) cmp, forward8 jnz, xnip, ax $fe00 i) or, L1 absjmp, forward!
+ si 0 d) -1 i) cmp, forward8 jnz, xnip, ax $fe08 i) or, L1 absjmp, forward!
ax $8000 i) or, L1 abscall, ( n -- )
ax dwrite, xdrop, ret,