EtchedPixels / CC6303

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

Syntax errors with conditional jumps #24

Closed ry755 closed 7 months ago

ry755 commented 7 months ago

Hi, I am attempting to build the FUZIX Compiler Kit for Z80 which depends on /opt/ccz80/bin/asz80 from this repo. It works up until it gets to the part where it compiles the Z80 support code (in the supportz80 directory). I'm getting errors similar to the following:

make[1]: Entering directory '/home/ry/FUZIX/Fuzix-Compiler-Kit/supportz80'
ccz80 -c __switchc.s
__switchc.s: 26: Q: syntax error.
__switchc.s: 31: Q: syntax error.
make[1]: *** [Makefile:65: __switchc.o] Error 1
make[1]: Leaving directory '/home/ry/FUZIX/Fuzix-Compiler-Kit/supportz80'
make: *** [Makefile:140: supportz80] Error 2

Lines 26 and 31 of __switchc.s contain conditional jr instructions which look correct to me. I tried changing them to jp but that results in the same error. Attempting to assemble other files which contain conditional jumps also give similar errors. Removing the condition makes it assemble without error.

asz80 was built by running make -f Makefile.z80 install in the as68 directory, using GCC 11.4.0 on Ubuntu 22.04.

ry755 commented 7 months ago

Okay.... right after reporting this issue I tried rebuilding asz80 and running it again and it just magically worked?? I didn't change anything, uhhh. I guess I'll close this issue, but if you can reproduce this on your end then feel free to reopen it, I have no idea why it wasn't working before :p