How do I implement floating point IEEE754 division in 68k assembly or in general?
I have to create a floating point implementation for a 68k processor in IEEE754 format, and I've figured out how to do all the other basic operations (conversion from decimal, addition, subtraction, multiplication), but I can't figure out how to do division. From my understanding, you're supposed to divide the mantissas and then subtract the exponents. However, if you divide the mantissas, you get ANOTHE开发者_运维百科R floating point, and that's definitely not what I want nor can use (since the only division function the 68k processor provides shows the result of integer division, and the modulus remainder answer).
Can anyone provide an example of how to do this kind of division on a 68k processor, or in general with my limitations?
Here you can find exact algorithems and explanations for IEEE 754 floating point math...
float to integer conversion
integer to float conversion
normalize
add/subtract
multiply
divide
...unfortunately not for 68k CPU, however algorithems are the same.
Here you have a flowchard for 24 bit FP divide a = a / b
:
精彩评论