mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-27 11:28:05 +11:00
bf4ab0f1b4
For the IY->BC move, of course.
16 lines
404 B
Plaintext
16 lines
404 B
Plaintext
( Borrowed from http://wikiti.brandonw.net/ )
|
|
( Divides AC by DE and places the quotient in AC and the
|
|
remainder in HL )
|
|
CODE /MOD EXX, ( protect BC )
|
|
DE POP, BC POP, chkPS,
|
|
A B LDrr, B 16 LDri,
|
|
HL 0 LDdn,
|
|
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
|