[Coco] Which version of C?

K. Pruitt pruittk at roadrunner.com
Mon Jan 12 05:08:39 EST 2015



>
>> On Sunday, January 11, 2015 11:32:37 PM K. Pruitt did opine
>> And Gene did reply:
>>> There seems to be a couple of different versions of C floating around
>>> out there.  On a coco 3 with a 6809 running NitrOS9 level 2, which
>>> version of C should I be running?
>>>
>>> I remember not really caring for the first C that Tandy had for OS9.
>>> And that was my first exposure to C so it kind of soured me on C for
>>> a long time. I used Turbo C from Borland for a bit. That was pretty
>>> fun. And I meddled with GCC a bit and it wasn't too disastrous. So I
>>> am thinking maybe I'll give C on the Coco another shot.
>>>
>>> Thanks.
>>
>> That Tandy C compiler, written my Microware, has a generally good code
>> generator, but some of the support functions were broken. We now have a
>> much better c.prep I had a hand in, and Willard Goosey has since improved
>> even more, and that c.prep v19b should be considered as a total
>> replacement for the tandy supplied version.  Several others have supplied
>> additional translators and code optimizers.  If you want to feed it
>> normal ansi C, with void's and such, then you will run the output of
>> c.prep thru ansifront.13, which translates the voids to something the
>> compiler in c.comp or the chained c.pass1 and c.pass2 can understand.
>> Then we've an improved c.opt2, and your choice of driving scripts, there
>> are several for sequencing the whole maryann.
>>
>> But the best optimizer is the human brain. By interrupting the compiler
>> and inspecting the assembly code as it would be sent to c.asm (or rma
>> today) and spend some time looking for bit shift loops that shift by 8
>> one way or the other, nuke that code and sub a tfr, clear statement pair
>> in its place. That is one of the tricks that took rzsz from just barely
>> keeping up with a 2400 baud modem, aka 240 bytes a second to nearly 720
>> bytes a second running on a 6309. That, and changing to a table lookup
>> crc which is much faster than calculating it.
>>
>> Cheers, Gene Heskett
>> -- 
>> "There are four boxes to be used in defense of liberty:
>> soap, ballot, jury, and ammo. Please use in that order."
>> -Ed Howdershelt (Author)
>> Genes Web page <http://geneslinuxbox.net:6309/gene>
>> US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS
>>
>> -- 
>
> Wow, Gene, I almost understood about 80% of that.  I normally only 
> understand about half of what you're saying.  But I always flag your 
> messages as important because even understanding only half of what you're 
> talking about is like walking through a gold mine with nuggets strewn 
> about just waiting to be picked up.  Eventually I'll understand even more 
> of the gems you share here.  Thanks for doing so.  I wrote an Xmodem CRC 
> utility for OS-9 years ago and the math was so extensive and honestly way 
> above my head (polynomials?) and that actually helped me understand your 
> code optimization comments. I'm still very fond of using tables instead of 
> cycle-eating math when I can.
>
> By the way, my thanks also goes out to Robert Gault and a quite a few 
> others here for all the great help you guys share here.
>
>
>

Ah!  I had to consult Leventhal's book, but I now get what you're saying.  I 
don't think I've ever used the TFR instruction before. You can bet I'll be 
playing with it now.



More information about the Coco mailing list