I have my boot.asm
And boot_shared.inc
I want somehow to import lib_SwitchBank into any bank, but instead I get "Duplicate external identifier: `lib_SwitchBank'" even though (and I might be wrong) they are on the same address... Scope doesn't seem to have. I should not have too many of those routines, but I need at least a couple. How can I correctly link it?
Code:
.segment "CODE"
.include "boot_shared.inc"
.segment "VECTORS"
.word nmi
.word reset
.word irq
.segment "BANK0"
.scope b2
.include "boot_shared.inc"
.segment "VECTORS0"
.word nmi
.word reset
.word irq
.endscope
.include "boot_shared.inc"
.segment "VECTORS"
.word nmi
.word reset
.word irq
.segment "BANK0"
.scope b2
.include "boot_shared.inc"
.segment "VECTORS0"
.word nmi
.word reset
.word irq
.endscope
And boot_shared.inc
Code:
.import main
reset:
...
lda #0
jsr lib_SwitchBank
jmp main
nmi:
...
rti
irq:
rti
.export lib_SwitchBank
.proc lib_SwitchBank
and #$0F
sta $8000
rts
.endproc
reset:
...
lda #0
jsr lib_SwitchBank
jmp main
nmi:
...
rti
irq:
rti
.export lib_SwitchBank
.proc lib_SwitchBank
and #$0F
sta $8000
rts
.endproc
I want somehow to import lib_SwitchBank into any bank, but instead I get "Duplicate external identifier: `lib_SwitchBank'" even though (and I might be wrong) they are on the same address... Scope doesn't seem to have. I should not have too many of those routines, but I need at least a couple. How can I correctly link it?