[Coco] gcc-coco-rsdos installer for Mac OS X
James Jones
jamesjones01 at mchsi.com
Wed May 26 23:56:12 EDT 2004
alsplace at pobox.com wrote:
> I wonder, if it can be made to do OS-9 stuff, how it will compare to
> the old K&R Microware compiler.
The Microware 6809 C compiler is, as you say, compatible with K&R 1st
edition (save that it lacks bitfields, and you have to gratuitously call
some dummy routines to drag in support for printing 32-bit integers to
avoid always dragging it in (since format strings are interpreted at run
time, there's no way to automatically determine a priori whether you
need it).
Having prototypes would avoid the perverse semantics of K&R C's (ack; I
had to look up the old style syntax...)
int
blah(f)
float f;
{
....
}
which requires that the parameter be converted to double to be passed,
and get converted right back to float in the function prologue of
blah(). If the compiler is good, it will also let one avoid gratuitous SEX.
The main thing about generating code for OS-9 is making it always
generate position-independent code and non-absolute addressing for data
of any sort.
James
More information about the Coco
mailing list