New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suppress "Suspicious address expression" for 65816 direct page #194
Comments
|
Uz put this in a comment in the source code:
You can avoid the warning by putting a "dummy" operation into the expression: |
|
@oliverschmidt: This issue should get the "question" label. |
|
Is there a label for bugs in the manual? |
|
Nope - I'd say the label 'bug' with an explanation that it's about the manual should be fine - at least for now... |
|
If this issue is supposed to be a bug in the manual then it should be updated to explicitly state where the bug in the manual is located. Otherwise I'd consider the question answered - and therefore close this issue. |
|
I think that each of the tool documents should have an appendix that lists that tool's messages and what they mean. (But maybe, that should be a separate issue.) It has occurred to me that the |
|
I think that "suspicious" warning should be suppressed completely when targetting the 65816. The code pattern that it's trying to protect from typos is this one: And there's no reason to use that pattern in 65816 code, because it has 16-bit registers. |
|
There's no reason for specifically that pattern in 65816 code that isn't shared with a 6502 version of the same program. But sometimes, both bytes of an address need to be written to the same MMIO port. The Super NES has a couple ports like this, such as the OAM (sprite display list) address. Which has another way to do it: |
|
The "safe" alternate is: |
|
Related:
|
|
I don't see any open question here... |
On 65816, it is common to access several addresses in the same 256-byte page of bank $00 using direct page addressing mode. However, ca65 raises a "Range error" when using this with addresses not in the true zero page, and attempts to work around this error result in a "Suspicious address expression" warning. The docs mention neither this warning nor a way to suppress it.
The text was updated successfully, but these errors were encountered: