I'm now writing a program for microcontroller AT89S51, and I'm using C language.
I have a 2 byte data which is located in R1 and R0, where R1 is the high byte and R0 is the low byte.
To describe more : my_data = R1x256 + R0
Now I have to divide my data by 58, and I have no idea how to do it.
If I divide R1 with 58, then I will get a residue. I cannot move the residue to R0, because if I want to do it then I have to multiply the residue with 256. which will make an overflow to R0.
Do you have any algorithm to do this ?
Please help me, any help would be appreciated.