Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.
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:
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?
Last edited by the_doctor on Sat May 28, 2016 8:47 pm, edited 1 time in total.
It 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?
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...
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#p154086
The solution was to uninstall the old version. I know you said you did that, so IDK.
nesdoug.com -- blog/tutorial on programming for the NES
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'.
nesdoug.com -- blog/tutorial on programming for the NES
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).
nesdoug.com -- blog/tutorial on programming for the NES