[Coco] gcc-coco revisited

John E. Malmberg malmberg at Encompasserve.org
Sat Nov 1 11:04:00 EST 2003


KnudsenMJ at aol.com wrote:
> 
> I get the impression that target machines can be specified, or at least 
> modified, for GCC by relatively non-experts (not compiler writers).  But I think 
> it's  more than mnemonics -- the 6309 has more registers, and opcodes that take 
> several 6809 ops to emulate.
> 
> Anyway, you could end up with 8 target combinations:

  RSDOS or OS9 or HGBDOS or FLEX-09, or bare machine.

  COCO I/II or COCO III.  - The memory management is different.

  BASIC in ROM, BASIC in RAM. - Where you can put overlays.

> 68 or 63
> PIC or not

Changing targets is actually a global switch that specifies:

1. Run time libraries.
2. Calling convention.
3. Object/Executable format.
4. Overlay conventions.

Inside the compiler there should be more fine grained macros #define to 
handle this.

IMHO: compiler should know as little about the target operating system 
as possible, and use #pragma to indicate the calling conventions.

Then much of the customization for different operating systems can be 
done with header file optimizations.


-John
wb8tyw at qsl.net
Personal Opinion Only




More information about the Coco mailing list