collapseos/blk/823
Virgil Dupras ae719508d9 pcat: make /MOD division 16-bit
Was required for the many "256 /MOD" in the code.
2020-06-20 19:14:51 -04:00

14 lines
384 B
Plaintext

CODE + AX POPx, BX POPx, AX BX ADDxx, AX PUSHx, ;CODE
CODE - BX POPx, AX POPx, AX BX SUBxx, AX PUSHx, ;CODE
CODE *
AX POPx, BX POPx,
DX PUSHx, ( protect from MUL ) BX MULx, DX POPx,
AX PUSHx,
;CODE
CODE /MOD
BX POPx, AX POPx, DX PUSHx, ( protect )
DX DX XORxx, BX DIVx,
BX DX MOVxx, DX POPx, ( unprotect )
BX PUSHx, ( modulo ) AX PUSHx, ( division )
;CODE