Why does DIV AB converts from hex to decimal 8051
Simple enough

A starts out being a number between zero and 255.

Lets say its FF i.e. 255..

Dividing by 10 gets you 25 in A and 5, the remainder, in B. That's the units value, so we save B to R7

Next we setup B with 10 again and divide the 25 by ten, and again store the remainder, this time in R6, as the tens digit.

What is left in A is the hundreds count, and we store that in R5.

So.. R5,6, and 7 now contain 2,5,5, the decimal equivalent of FF.

Here is a register trace if it helps..