I only worked out one random example by hand. Kind of a distributed division:
<snip>
; adjust by hi byte
ldx dividend+1
clc
adc factor,x
factor:
.byte 0*85, 1*85, 2*85
$1FF aka 511 is a special case you will need to handle...
But if I work it out by hand I get the correct result:
511 = %01 1111 1111
511/3 = 170
x(lo) = 255 = %1111 1111
x(lo)/3 = 85 = %0101 0101
x(hi) = 1 = %01 (so add 85)
85 + 85 = 170
Is there a mistake? A carry bit threw the calculation off somewhere?