[Coco] Microware C Compiler port

John W. Linville linville at tuxdriver.com
Tue Jan 20 21:04:08 EST 2009


On Fri, Jan 16, 2009 at 08:03:23AM -0500, Steven Hirsch wrote:

> I sent the compiler sources and binaries to about six people that  
> contacted me directly, but have heard nothing, nada, zilch, zip..
>
> Has anyone tried using it for anything?  Any comments or observations?

So I went looking for some old K&R sources that I could play with and
reasonably expect to test on a (emulated) coco.  I decided to try some
utilities from an old version of Minix (1.1).  The 'wc' utility seemed
like a reasonable candidate.  I'll attach the slightly modified sources
I got to work along with the diff from the original Minix sources.

Some of the changes are simple, such as changing "%6D" to "%6d",
implementing a utility function ("sig_err"), and fixing an actual
syntax error.  That was enough to get the program basically running,
but it was producing 0 counts for lines, words, and characters.

The original sources had those count vars defined as long.  Changing
them to int yielded correct results, except that it doesn't take much
to overflow the character count... :-(

Did this compiler have problems with long in the original OS-9/6809
version?  It is bad enough to not handle long, but to compile it
without complaint and simply not work seems rather  wrong.  FWIW,
changing to 'long int' didn't change anything.

Still, it _is_ cool to compile for OS-9 on my Linux box... :-)

John
-- 
John W. Linville		Linux should be at the core
linville at tuxdriver.com			of your literate lifestyle.



More information about the Coco mailing list