[Coco] C compiler self-hosting on NitrOS9 again!

Bill Pierce ooogalapasooo at aol.com
Mon May 4 10:00:25 EDT 2020


I assume this compiler runs under OS-9/NitrOS9. Why noy present it as OS-9 code on OS-9 formatted disk images ready to be copied to one's HD?
I will move it to my NitrOS9 development system and give it the MShell test... So far, only my compiler system and the original Tandy/MW compiler (not quite as optimized) can compile it. I've tried many. The most common failures are the inclusion of C.Prep19b/c and certain versions of C.comp, most of which are buffer size failures, label count failures and line length failures. The MShell sources uses a LOT of labels, some extremely long lines and requires plenty of buffer space when compiling most large modules.
I'll give it a try and see how it does.
Bill P.


-----Original Message-----
From: Jeff Teunissen <deek at d2dc.net>
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Sent: Sun, May 3, 2020 11:36 pm
Subject: [Coco] C compiler self-hosting on NitrOS9 again!

Some of you know I've been hacking on the "C3" compiler that's been
bouncing around, and anyone else who's played with it knows that it
doesn't really work right.

Well, it does now. :)

In the "CoCo C" repository on GitHub is a K&R C preprocessor and
compiler that can be built (in a multi-stage process requiring the old
Tandy compiler to start from), that is also capable of compiling its
own code, so we can produce a new version of the compiler by using its
own code.

The code it produces is slightly more efficient than that produced by
the Tandy compiler, so as far as I can tell will almost always produce
smaller binaries.

Note: the code _also_ compiles on modern x86 systems, but the
resulting binaries don't produce working code -- there are endianness
problems that need tracking down before it will be a good
cross-compiler. If anyone locates the code that's producing the
errors, let me know. :)

It's available at <https://github.com/Deek/CoCoC>.

-- 
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco


More information about the Coco mailing list