[Coco] Retrochallenge -- Micro-C for CoCo

Gene Heskett gheskett at wdtv.com
Wed Jul 31 14:41:05 EDT 2013


On Wednesday 31 July 2013 14:20:35 billg999 at cs.uofs.edu did opine:

> > John,
> > I would love to see this mature into a an official release. This has
> > been needed for a long time.
> 
> What has been needed?  A C compiler?  What's wrong with the MicroWare
> C Compiler?  I haven't used it in ages, but back in my first go around
> with OS9 (the original one, not NitrOS9) I never ran into any serious
> problems with it.
> 
It is not that bad once ansifront and the new c.prep cover the C89 bases 
for the most part.  Its major downfall and time waster is bit shifting, a 
huge drag in some of the encryption and crc calcs because at least 50% of 
the bit shifts in normal code are <<8 or >>8, which its constructs a loop, 
doing one bit at a time until it has done the commanded number.  But the 
6x09 has register transfers, so instead of the loop, an >>8 can be done 
with a
 tfr a,b
 clra
which is exactly the same thing.  Just reverse the tfr & clr's to do <<8.

Your rzsz code from version 3.17 on to 3.36 that I built for us was stopped 
at the output of cc2, inspected for such bits & pieces, particularly in its 
cumulative crc stuffs, and all those << generated loops converted to those 
2 code sequences to obtain the data to be fed to the crc calculator, and 
the crc calculator replaced with a table driven system, then fed on to 
c.opt & c.asm etc.

The combined effects as measured on thru put went from about 290 cps, just 
barely keeping up with a 2400 baud modem, to, depending on the cpu's 2 
digit, 640 to 730 cps.  And, if I could figure out how to allocate a buffer 
the same size as the zmodem window and do it on the fly, probably could 
gain enough to keep up with a 9600 baud circuit because I could accumulate 
the buffers contents & then pass the entire buffer to the crc routine, 
which would be faster than doing it all one character at a time.  But 
Chuck, at Omen Tech, has removed public access to his zmodem code, so we 
are frozen in time at 3.36 AFAIK.

> On a side note, I have long planned on trying to take Small C and
> make it work on the COCO with an eye towards expanding it into a
> usable C compiler as well as coming up with a version of Tiny Pascal
> that could then be expanded into a more complete (if not ISO) compiler.
> But I never had a time schedule as I only do this because I love
> working with compilers.  :-)
> 
> bill
> 
> 
> 
> 
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco


Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://coyoteden.dyndns-free.com:85/gene> is up!
My views 
<http://www.armchairpatriot.com/What%20Has%20America%20Become.shtml>
Your friends will know you better in the first minute you meet than your
acquaintances will know you in a thousand years.
		-- Richard Bach, "Illusions"
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
         law-abiding citizens.



More information about the Coco mailing list