[Coco] Nitros9 C and maths lib

Alex Evans varmfskii at gmail.com
Thu Oct 31 16:24:47 EDT 2019


I don't know about the code, but my copy of the C Compiler manual says PDP-11.

On Wed, Oct 30, 2019 at 11:59 PM Jeff Teunissen <deek at d2dc.net> wrote:
>
> Note that the code talks about PDP1 stuff, but it comes from the -11
> (because the C compiler came from Unix). The PDP-1, to the best of my
> knowledge, had no floating point at all.
>
> On Mon, Oct 28, 2019 at 3:46 AM Walter Zambotti <zambotti at iinet.net.au> wrote:
> >
> > I have conversion routines already written.
> >
> > Yes they are PDP-11.
> >
> > If you look in the follow code from OVCC you can grab the code.
> >
> > https://github.com/WallyZambotti/OVCC/blob/master/mpu/fpu.c
> > https://github.com/WallyZambotti/OVCC/blob/master/mpu/dma.h
> >
> > Walter
> >
> > -----Original Message-----
> > From: Coco [mailto:coco-bounces at maltedmedia.com] On Behalf Of Jeff Teunissen
> > Sent: Monday, 28 October 2019 5:27 AM
> > To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
> > Subject: Re: [Coco] Nitros9 C and maths lib
> >
> > Just wondering, what format are your floating point numbers in? OS-9 C (like almost every other C at the time) uses PDP-11/VAX format for its floating point numbers. It's slightly different from the little-endian IEEE
> > 754 stuff we usually see today, but with a little massaging it's compatible.
> >
> > On Mon, Oct 21, 2019, 11:39 AM Walter <zambotti at iinet.net.au> wrote:
> >
> > > James
> > >
> > > Sorry missed your reply way back in July.
> > >
> > > Not sure what you mean about state but it currently is not multi
> > > tasking safe.
> > >
> > > It uses a number of ports to set up pointers to the source and
> > > destination values and another port to trigger the required function.
> > >
> > > As this requires several bytes written the execution could be
> > > interrupted at any time and this would cause issues if more than one
> > > FPU task was running at a time.
> > >
> > > I suppose I could create a wrapper around the calls that turned off
> > > interrupts for the duration of the FPU call.
> > >
> > > Walter
> > >
> > > -----Original Message-----
> > > From: Coco [mailto:coco-bounces at maltedmedia.com] On Behalf Of James
> > > Jones
> > > Sent: Thursday, 4 July 2019 11:31 AM
> > > To: CoCoList for Color Computer Enthusiasts
> > > Subject: Re: [Coco] Nitros9 C and maths lib
> > >
> > > Virtual FPU device? Is that documented? How much state information
> > > does it keep around?
> > >
> > > On Mon, Jun 10, 2019 at 2:24 AM Walter Zambotti
> > > <zambotti at iinet.net.au>
> > > wrote:
> > >
> > > > I have converted my raytrace program to use the virtual FPU device
> > > > in
> > > OVCC.
> > > >
> > > >
> > > >
> > > > It improves performance by around 50 times.
> > > >
> > > >
> > > >
> > > > As I was no longer using any function (pow,sin,cos) from the
> > > > standard mlib.l library I removed it from the link and it links
> > > > without any issue however the floating point maths computations are
> > > > all zero!!!
> > > >
> > > >
> > > >
> > > > This seems strange.  Why would I need to include a library that is
> > > > no longer referenced?
> > > >
> > > >
> > > >
> > > > So if I use either of these two compile commands:
> > > >
> > > >
> > > >
> > > > cc -A raytrace.c -l=/dd/lib/mlib.l -m=8k
> > > >
> > > >
> > > >
> > > > or
> > > >
> > > >
> > > >
> > > > cc -A raytrace.c -m=8k
> > > >
> > > >
> > > >
> > > > Both compile and link without error however only the former produces
> > > > correct output.
> > > >
> > > >
> > > >
> > > > Walter
> > > >
> > > >
> > > > --
> > > > Coco mailing list
> > > > Coco at maltedmedia.com
> > > > https://pairlist5.pair.net/mailman/listinfo/coco
> > > >
> > >
> > > --
> > > Coco mailing list
> > > Coco at maltedmedia.com
> > > https://pairlist5.pair.net/mailman/listinfo/coco
> > >
> > >
> > > --
> > > Coco mailing list
> > > Coco at maltedmedia.com
> > > https://pairlist5.pair.net/mailman/listinfo/coco
> > >
> >
> > --
> > Coco mailing list
> > Coco at maltedmedia.com
> > https://pairlist5.pair.net/mailman/listinfo/coco
> >
> >
> > --
> > Coco mailing list
> > Coco at maltedmedia.com
> > https://pairlist5.pair.net/mailman/listinfo/coco
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco


More information about the Coco mailing list