I m trying to find how to make a division in ARM since there is no DIV
command. If that can be done by multiplication of a float number [/9 = *0.09]
, b
If you just want to divide an integer value in r0
by 9 you can approximate that with:
ldr r3,=0x1C71C71D # 1C71C71D == (2^32 / 9) + 1
umull r9,r3,r0,r3
r3
now contains the integer part of the quotient, and r9
contains the fractional part scaled by 2^32. To get the remainder you'd just multiply the integer part of the quotient by 9 and subtract the result from the original value.