[Coco] CoCo gcc project

Gene Heskett gene.heskett at verizon.net
Fri Oct 31 22:14:01 EST 2003


On Friday 31 October 2003 21:50, KnudsenMJ at aol.com wrote:
>In a message dated 10/31/03 3:16:59 PM Eastern Standard Time,
>
>jdaggett at gate.net writes:
>> I wished the 6809 had a DIV instruction!!!! Some base code to
>> implement
>
>what the
>
>>  HC11 FDIV and IDIV instructions would be nice. Then you have 16
>> bit by 16 bit divide.
>
>To merge with another thread, the Star Wars arcade game used a 6809
> and had an outboard hardware divide board, built of 7400-series TTL
> ICs.  Don't recall how many clocks it took.
>
>If you look at the stock OS-9 C libraries, you will find various
> integer and floating point math routines, including signed and
> unsigned divide routines. Don't know how optimized they are.  From
> my own gory/glory days of writing math routines, ISTR that
> non-restoring divides are faster, at the expense of a few more
> lines of code, but you don't execute all the code for every bit.
>
>For a different approach to trig and other functions, check out
> BASIC09's math routines, which use CORDIC rotation approximations
> -- faster than series expansion.  You'd have to figure out how they
> work and re-write for C's floating point.  Oh yes, 6809 C library
> already includes "double" precision routines, no doubt really slow,
> but what can you expect?  And who would use them on a 6809 anyway? 
> --Mike K.

I did, made heavy usage in fact, in converting an eclipse prediction 
program I was interested in, written originally in Basic-5.22 to C on 
the coco.  I used the trig math library published by the rainbow.  
Working in Julian time, it could spit out eclipse dates and times way 
faster than a printer could keep up with it.  The printer was an oki 
24 pinner on a parallel port at the time.  Fairly fast, but the coco 
1 running os9l1 at .79 mhz was up to the job of keeping it busy.  
This library output 17 digits of precision, good always to the 16th 
digit, and was quite fast for what it was doing.  The only problem I 
had was investigating B.C. events, Julian time breaks down in the 
year 4714 B.C. going backwards.

-- 
Cheers, Gene
AMD K6-III at 500mhz 320M
Athlon1600XP at 1400mhz  512M
99.27% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attornies please note, additions to this message
by Gene Heskett are:
Copyright 2003 by Maurice Eugene Heskett, all rights reserved.




More information about the Coco mailing list