Ruud
Veteran Member
Hello,
I know how to convert a number like 286.75 into FP by hand. One of the two main problems I have is 1) converting the fraction into FP using 8088 instructions and 2) how to handle E-numbers like 1.23456 E 14 when the exponent is large.
If I google on the subject I get a lot of hits that point to the way it is in done in Python, C, etc. i.e. using their interna functions. The very few ones I found so far use ML used 8087 instructions. I even tried Turbo Debugger to see how Turbo Pascal does it, only to find out that still outputs FPU code and while stepping through the program, the emulated code is executed under water.
The one solution I have now is looking at the source code of the ROMs of the C64 to see how it was done there. A problem, the comments are not always clear or it was not understood well by the author. I think that given time, I will solve it. But OTOH in this case it is stupid to invent the wheel twice IMHO. Real code or a good document is welcome!
Thank you very much in advance for any help!
I know how to convert a number like 286.75 into FP by hand. One of the two main problems I have is 1) converting the fraction into FP using 8088 instructions and 2) how to handle E-numbers like 1.23456 E 14 when the exponent is large.
If I google on the subject I get a lot of hits that point to the way it is in done in Python, C, etc. i.e. using their interna functions. The very few ones I found so far use ML used 8087 instructions. I even tried Turbo Debugger to see how Turbo Pascal does it, only to find out that still outputs FPU code and while stepping through the program, the emulated code is executed under water.
The one solution I have now is looking at the source code of the ROMs of the C64 to see how it was done there. A problem, the comments are not always clear or it was not understood well by the author. I think that given time, I will solve it. But OTOH in this case it is stupid to invent the wheel twice IMHO. Real code or a good document is welcome!
Thank you very much in advance for any help!