== 8bit division ==
'''Input:''' HL=Value1, C=Value2
'''Output:''' L=Value1/Value2, H=Value1 MOD Value2
'''Destroyed:''' AF,BC
<pre>
LD B,8
Div_Next:
ADD HL,HL
LD A,H
SUB C
JR C,Div_NXTB
LD H,A
INC L
Div_NXTB:
DJNZ Div_Next
RET
</pre>
== 16bit division ==