1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 12:28:06 +11:00
collapseos/blk/320
2020-08-15 08:11:48 -04:00

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 LDdi,
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