I have problem (ca65) with access to the scope which is declared farther, like this:
This construction is not working. Any suggestions how to fix it?
I have many scopes that use the data between them, so far I used this construction, but it makes code obscure:
Code:
.scope main
.scope first
lda #second::val
.endscope
.scope second
val = $15
.endscope
.endscope
.scope first
lda #second::val
.endscope
.scope second
val = $15
.endscope
.endscope
This construction is not working. Any suggestions how to fix it?
I have many scopes that use the data between them, so far I used this construction, but it makes code obscure:
Code:
.scope main
.scope first
.import val
lda #val
.endscope
.scope second
.export val
val = $15
.endscope
.endscope
.scope first
.import val
lda #val
.endscope
.scope second
.export val
val = $15
.endscope
.endscope