2020-04-22 21:19:12 -04:00
|
|
|
( Borrowed from http://wikiti.brandonw.net/ )
|
|
|
|
( Divides AC by DE and places the quotient in AC and the
|
|
|
|
remainder in HL )
|
2020-07-05 23:12:17 -04:00
|
|
|
CODE /MOD EXX, ( protect BC )
|
|
|
|
DE POP, BC POP, chkPS,
|
|
|
|
A B LDrr, B 16 LDri,
|
2020-06-27 22:01:56 -04:00
|
|
|
HL 0 LDdn,
|
2020-07-05 23:12:17 -04:00
|
|
|
BEGIN,
|
|
|
|
SCF, C RL, RLA,
|
|
|
|
HL ADCHLd, DE SBCHLd,
|
|
|
|
IFC, DE ADDHLd, C DECr, THEN,
|
|
|
|
DJNZ, AGAIN,
|
|
|
|
B A LDrr,
|
|
|
|
HL PUSH, BC PUSH,
|
|
|
|
EXX, ( unprotect BC ) ;CODE
|