If you're referring to a global symbol from inside a .scope
or .proc
, sometimes you have to explicitly state that the symbol is in the global scope and not the inner scope. You do this by adding the "paamayim nekudotayim" (pair of colons) operator before the symbol: ::spam
. I've noticed this mostly with things like .if
.
The following compiles in ca65:
foo = $82
.scope
LDA #$ff
STA ::foo*$40
.endscope