A C compiler that can compile for dragon 32?
-
- Posts: 14
- Joined: Sat Apr 29, 2017 7:13 pm
A C compiler that can compile for dragon 32?
Hi,
is there a C compiler available (for linux preferably) that can compile for the dragon 32?
Thanks,
luke
is there a C compiler available (for linux preferably) that can compile for the dragon 32?
Thanks,
luke
Re: A C compiler that can compile for dragon 32?
Also, Pierre Sarrazin has developed a 6809-generating cross-compiler for a subset of the C language.
http://perso.b2b2c.ca/~sarrazip/dev/cmoc.html
The website says `The most significant difference between CMOC and a complete C compiler is the absence of longs and floats and of the const keyword.'
I'm not very knowledgable about such things but thought I'd post a link in case it was of interest?
http://perso.b2b2c.ca/~sarrazip/dev/cmoc.html
The website says `The most significant difference between CMOC and a complete C compiler is the absence of longs and floats and of the const keyword.'
I'm not very knowledgable about such things but thought I'd post a link in case it was of interest?
Re: A C compiler that can compile for dragon 32?
Of course it's of interest!
I've tried a couple of times to compile gcc6809 without luck, so maybe this one will come in handy.
Thanks, mate!
I've tried a couple of times to compile gcc6809 without luck, so maybe this one will come in handy.
Thanks, mate!
-
- Posts: 14
- Joined: Sat Apr 29, 2017 7:13 pm
Re: A C compiler that can compile for dragon 32?
I'll certainly give this a look - compiling gcc6809 seems like a bit of a pain.I wonder if there's a graphics library?Bosco wrote:Also, Pierre Sarrazin has developed a 6809-generating cross-compiler for a subset of the C language.
http://perso.b2b2c.ca/~sarrazip/dev/cmoc.html
The website says `The most significant difference between CMOC and a complete C compiler is the absence of longs and floats and of the const keyword.'
I'm not very knowledgable about such things but thought I'd post a link in case it was of interest?
Re: A C compiler that can compile for dragon 32?
I know CMOC supports inline assembly language. Handy I guess for sections of code which are speed critical.
I think Rick Adams wrote `Temple of Rom' using a mix of C and ASM?
I think Rick Adams wrote `Temple of Rom' using a mix of C and ASM?
-
- Posts: 14
- Joined: Sat Apr 29, 2017 7:13 pm
Re: A C compiler that can compile for dragon 32?
So far I've managed to write the classic "Hello world" program using CMOC and run it on xroar and I'm quite impressed, but I don't know how to then convert that so I can run it on real hardware (to cas or WAV). any ideas?
-
- Posts: 14
- Joined: Sat Apr 29, 2017 7:13 pm
Re: A C compiler that can compile for dragon 32?
I can't seem to make bin2cas work, there's probably an option I'm missing.Bosco wrote:I use `Bin2Cas'.
http://www.6809.org.uk/dragon/#castools
viewtopic.php?f=7&t=4855&p=11680&hilit=bin2cas#p11680
I have this program:
Code: Select all
#include <cmoc.h>
int main()
{
printf("HELLO WORLD!\n");
return 0;
}
Code: Select all
cmoc main.c
Code: Select all
./bin2cas.pl main.bin -omain.cas
./cas2wav main.cas main.wav