Still wondering what is wrong in a?
OK let's work through this a bit to see what's wrong with a.

On the 1st pass;

H = 37234
w = 1

37234/1 = 37234. Not much help so far. This is $9172 in HEX.

$9172 has a high byte of %10010001 & a low byte of %01110010.

Since Divisor is a byte array, Divisor[b] will always be loaded with
the low byte of the result (H/w) & $0F.

Now take your low byte %01110010 & AND it with %00001111. The result is
%00000010 or 2d, which, of course, isn't what you're expecting.

Do you see how this is working?

Not yet! OK we'll do one more;

on the 2nd pass;

H = 37234
w = 10

37234/10 = 3723.4. The .4 is lost so you have 3723, which = $E8B.

$E8B has a high byte of %00001110 & a low byte of %10001011.

Now take your low byte %10001011 & AND it with %00001111. The result is
%00001011 or 11d, which again is not what you're expecting.

OK - one more pass;

On the 3rd pass H still = 37234 and w = 100.

37234/100 = 372.34. Toss the .34 and you're left with 372, which = $174.
The high byte is %00000001 the low byte is %01110100.

The low byte %01110100 & %00001111 = %00000100 or 4d. You expected a
2d, but it returned 4d. Now you know why...;o}

That's how a is working. Just follow it along. It's really simple if you just take it
apart step-by-step.