joaopa wrote:Can anyone help me to compile?
I'm always a little worried about size and ram requirements when trying to compile a 32-bit program but you never know until you try it.
zcc doesn't like the .cpp extension so you'll gave to change that to .c. I didn't notice any obvious c++ in there until I tried to translate "symbol.cpp" aka "symbol.c" to assembly. Two functions declared in "prototypes.h" were found to be overloaded:
void decomp(void);
void decomp(int n);
and
void divpoly(void);
void divpoly(int n);
You'll have to disambiguate those by changing their names and then going through all the source to change to the correct function call. You might want to consider changing all the function names to have a scope preamble in their names to identify which source file they belong to but maybe that's not necessary for a quick attempt.
To translate to assembler:
Code: Select all
zcc +zx -vn -O3 -a symbol.c
zcc +zx -vn -SO3 -clib=sdcc_iy --max-allocs-per-node200000 symbol.c
By translating to assembler you don't have to worry about fitting in memory or missing definitions, etc. The first one uses sccz80 and the latter sdcc. sdcc tends to give more information when errors are encountered but line numbers will be all wrong. It's also more fully ansi so it will be able to accept more standard C programs than sccz80. I might use both to narrow down where errors are. The optimization level can be turned down to speed up the translation, especially for sdcc. I tend to leave that there because I also like to look at the quality of asm produced to find out if there is someplace things can be easily improved
