home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,940 of 4,675   
   Bart to Rick C. Hodgin   
   Re: I'm looking for a mathematical libra   
   19 Sep 19 00:50:46   
   
   From: bc@nospicedham.freeuk.com   
      
   On 18/09/2019 13:05, Rick C. Hodgin wrote:   
   > On 9/18/2019 6:51 AM, Bart wrote:   
   >> On 17/09/2019 08:54, Ruud Baltissen wrote:   
   >>> Hello,   
   >>>   
   >>> I'm working on my own OS, meant to run on various 8088 based   
   >>> machines, not just the PC. I'm also programming my own Pascal   
   >>> compiler that should run under that OS. It is able to compile itself,   
   >>> it only outputs macros and it is up to the assembler plus an INC file   
   >>> to turn it in a running program. So far I was able to create programs   
   >>> that run on a Commodore 64. I'm now busy now to create an INC file   
   >>> for the 8088. Outputting a string under my OS or MS-DOS goes fine.   
   >>> But I also need to fill the macros needed for the mathematical   
   >>> functions. I could invent the wheel twice but handling REALs is not   
   >>> easy. But Google wasn't my friend this time.   
   >>>   
   >>> So I'm looking for a mathematical library in assembler for the 8088.   
   >>> Can anybody help, please?   
   >>   
   >> Do these machines also have an 8087? That would help!   
   >>   
   >> Otherwise, a software library operating to modern standards, and   
   >> working with 64-bit IEEE, sounds like it's going be rather slow.   
   >   
   > I searched for it but couldn't find it.  There used to be an 8087.asm   
   > app that worked with DOS.  It would install a software emulator for   
   > the 8086/8088 CPUs so it would work with native x87 FPU instructions.   
   > I may still have it on one of my Programmer's Heaven CDs from back in   
   > the BBS days.   
   >   
   > It was fully IEEE-754 compliant and could be adapted.  In fact, IIRC,   
   > a version of that program was used to find the famous Pentium FDIV   
   > bug, as the software version was reporting correctly, and the Pentium   
   > was reporting incorrectly, over a particular range of inputs.   
      
      
   If emulating 8087 then that puts extra demands on the emulation library,   
   especially if emulating its internal 64-bit calculations.   
      
   When I was coding this stuff (sorry source code long since lost), I   
   coded to my own specifications, and did little checking other than for   
   divide-by-zero. To make it easier, and a bit faster, I think I arranged   
   for the exponent+sign to fit exactly into the top byte of 32 bits.   
      
   (While an older version for the 8-bit Z80, which had very limited 16-bit   
   capability, used a 24-bit format: 8-bit exponent/sign, and 16-bit mantissa.)   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca