From: dwight elvey:
Well, you've got me confused.
HL = dividend (Dnd)
ld d,h
ld e,l ; DE=Dnd
add hl,hl ; HL=Dnd*2
add hl,hl ; HL=Dnd*4
add hl,de ; HL=Dnd*5
add hl,hl ; HL=Dnd*10
ld b,h
ld c,l ; BC=Dnd*10
add hl,hl ; HL=Dnd*20
add hl,hl ; HL=Dnd*40
add hl,bc ; HL=Dnd*50
add hl,de ; HL=Dnd*51
; At this point, HL=0-41000
ld a,h ; A=HIGH(Dnd*51)
rra ; A=HIGH(Dnd*51)2
ld l,a ; L=HIGH(Dnd*51)/2
; At this point, you've lost me. But a non TLU fall-through 10-bit
divide with only one conditional branch at the end would be worth a
paper in CALGO, surely.
Cheers,
Chuck