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,958 of 4,675   
   Bart to Rick C. Hodgin   
   Re: I'm looking for a mathematical libra   
   20 Sep 19 20:48:22   
   
   From: bc@nospicedham.freeuk.com   
      
   On 19/09/2019 13:41, 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.   
   >   
   > Slow is a relative term.  The original 8086/8088 ran at 4.77 MHz.   
   > Modern CPUs could run full emulation solely in software at probably   
   > 300 MHz if not faster.  BGB has a simulation using his verilog-   
   > based logic that runs at 50 MHz, and that's simulating circuits.   
   >   
   > For a long time I've wanted to re-purpose the x87 opcodes to have   
   > a different kind of math library.  I've wanted to add arbitrary-   
   > precision support in lieu of 80-bit reals.  Use real hardware for   
   > 32-bit and 64-bit, but when using 80-bit loads and operations on   
   > 80-bit loaded values, use GMP and MPFR.  Haven't gotten around to   
   > it yet.  Too many other things to do first.   
      
   Arbitrary-precision floating point is going to be much slower than even   
   emulation of 8087. But in either case, overheads of using a function   
   call are going to be insignificant.   
      
   So I can't see the need to re-use 8087 opcodes. In any case, those are   
   designed to work with a small stack of 80-bit floating point values (in   
   that the operands will often be implicit). Arbitrary precision numbers   
   would have a different representation, and need to be put elsewhere, and   
   the results also need to be placed elsewhere   
      
   --- 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