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

16 lines
404 B
Plaintext
Raw Normal View History

2020-04-23 11:19:12 +10:00
( 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