Just a quick question, when compiling with CC65 (v2.15 - the latest windows snapshot) I'm getting unknown pragma errors ("WARNING: Unknown pragma 'bss' ") for the following:
Code:
#pragma bss-name (push,"ZEROPAGE")
I can't seem to find a straight answer to this by searching. Is this a version issue, and if so what version of CC65 should recognize a pragma like this?
I don't know the version history or when that feature was added, but you can get a more recent version at CC65's current website:
http://cc65.github.io/cc65/Documentation on pragmas is available on that same site:
http://cc65.github.io/doc/cc65.html#s7It looks like the last version on the old website called that pramga
bssseg instead. Don't ask me why they changed the name, or why it's not backward compatible. Fear of too many Ses in one place?
http://www.cc65.org/doc/cc65-7.html#s7 (old)
But I have the latest version from there (v2.15 - the latest windows snapshot) and cc65 still complains about that pragma unless I change it to
Code:
#pragma bssseg (push,"ZEROPAGE")
Checking the versions of a few things yields the following:
7845f1b is the absolute latest version at the time of me writing this post.
After performing a blame check, it looks like
bssseg became obsolete and
bss-name became the preferred method back in 2009:
https://github.com/cc65/cc65/commit/ed2 ... 126de6f517I can't particularly pinpoint an exact version, but hopefully this will narrow it down some.
Thanks for clarifying. So I'm confused as to why I'm getting this unknown pragma error for bss-name considering I have the latest version.
I did at one point install an old version of cc65, but I've replaced all those old files with the latest windows snapshot (hence why cl65 --version reports that I do have the latest version). But I wonder if that old install is still causing problems somehow...
I tried:
Code:
#pragma bss-name (push,"ZEROPAGE")
in a couple of different versions of CC65 that I have, including the newest one, and don't see any problems.
Maybe there is something weird going on with your text encoding? Is that
- a real
-, or...?
not sure what you mean by real - but yeah its a dash. Typed in like #pragma bss-name
Well, the warning should be Unknown pragma 'bss-name' if it doesn't recognize it (e.g. I could change it to "css-name" and that's exactly the term it would spit back). It seems very strange that it would say just bss, which is why I wondered if there is something weird about your hyphen.
If you have an old installation lying around, first thing I'd verify is that Make is not picking it up for some reason. You can try replacing the "cl65 ..." command in the Makefile with "cl65 --version", make, and see if it spits out the version you expect.
I recall having a similar problem when I had two different versions of cc65 on my computer, I even wrote about it here in the forum...
viewtopic.php?f=22&t=13171&p=154086#p154086The solution was to uninstall the old version. I know you said you did that, so IDK.
Here's another thought. Search your computer for cl65, and make sure that the installer didn't make a copy in your Program Files folder...a copy of the older version, that somehow is still in your 'paths'.
In any case I seem to have resolved the issue by performing a system restore to before I installed the old CC65
BUT now the compiler says "ld65: Error: Missing memory area assignment for segment 'ONCE' "
I don't know what that memory segment is, has anyone seen this before?
That's an easy one. Your linker file (.cfg) defines a memory segment called 'ONCE', and none of your other files used it. Either change your linker file to exclude it (or maybe add the words 'optional = yes' (? not certain?))...or, just slap a quick .segment "ONCE" anywhere in any ASM file...even with no contents, should resove the issue.
Edit...wait, I think it's the other way around... one of your files calls for a .segment "ONCE", but your linker file didn't define it. Either way, change the linker file (.cfg).
Awesome, totally worked, thanks!