EtchedPixels / CC6303

A C compiler for the 6800 series processors
Other
37 stars 8 forks source link

What is the state of the CC6303 cpu 6800 code generation? #30

Closed linuxha closed 2 days ago

linuxha commented 4 days ago

I've been playing with the 6800/Flex code generation. I've made a lot of changes to the comments output, the crt0.s for Flex (simplified for now) and I've started to dig into more complex code. I'm running into stack issues with the frame pointer (@fp). In the fixfp code I'm seeing that you're loading fp but never initializing fp. I've initialized it to 0000 in the crt0.s but now I'm trying to understand what's going. So bet to start off with asking: what is the state of the CC6303 cpu 6800 code generation?

EtchedPixels commented 4 days ago

6800 stuff was prototype only. It's not been past some of the most basic testing. I've not followed up on it because I've been working a new compiler from scratch for all the Fuzix stuff instead. That one does (as of a few days ago) have really good 6800 support as someone contributed it all.

I would start with the Fuzix compiler kit instead. https://github.com/EtchedPixels/Fuzix-Compiler-Kit

linuxha commented 4 days ago

So 'abandon all ye hope' and try the above. Okay, I can do that. :-)

EtchedPixels commented 4 days ago

Once I have 6803/6303 a bit more tested on the new compiler then this compiler is indeed going to get retired

linuxha commented 4 days ago

What state is the fcc compiler in? I can't get it pass support6803, fails with:

make[1]: Entering directory '/home/user/Fuzix-Compiler-Kit/support6303' fcc -m6303 -c negatel.s negatel.s: 24: Q: unexpected character. make[1]: [Makefile:24: __negatel.o] Error 1 make[1]: Leaving directory '/home/user/Fuzix-Compiler-Kit/support6303' make: [Makefile:177: support6303] Error 2

linuxha commented 4 days ago

I should put that in the Fuzix C Compiler repos/issues

linuxha commented 4 days ago

What state is the fcc compiler in? I can't get it pass support6803, fails with: ... fcc -m6303 -c negatel.s negatel.s: 24: Q: unexpected character.

Figured this one out, problem with a line with whitespaces (after final code). Removed them Also found a mix of ldaa/lda in the 6800 code. Fixed it (and other mnemonics, like staa/sta) in the old CC6303/as68 (linked to as6800).

EtchedPixels commented 4 days ago

You want the newer version of the assembler too in the Fuzix Bintools repository. That allows 6809 style mnemonics for 6800 and fixed the whitespace bug in the old CC6303 one. Linker has changed too but is related

linuxha commented 3 days ago

Thanks got it. Working on getting everything setup.