1
0
mirror of https://github.com/cc65/cc65.git synced 2025-02-03 22:32:24 +00:00

adapt to CHARGEN_RELOC

This commit is contained in:
Christian Groessler 2013-09-20 18:09:53 +02:00
parent 722dbaa1aa
commit 34e75afec3

View File

@ -6,6 +6,10 @@
.import callirq
.include "atari.inc"
.ifdef __ATARIXL__
.import __CHARGEN_START__
.include "romswitch.inc"
.endif
; ------------------------------------------------------------------------
@ -40,17 +44,27 @@ doneirq:
IRQStub:
cld ; Just to be sure
.ifdef __ATARIXL__
pha
lda PORTB
pha
and #$fe
sta PORTB ; disable ROM @@@ TODO: update CHARGEN
pha
.ifdef CHARGEN_RELOC
lda CHBAS
pha
.endif
lda PORTB
pha
and #$fe
sta PORTB ; disable ROM
set_chbase >__CHARGEN_START__
.endif
jsr callirq ; Call the functions
.ifdef __ATARIXL__
pla
sta PORTB
pla
pla
sta PORTB ; restore old ROM setting
.ifdef CHARGEN_RELOC
pla
sta CHBAS
sta CHBASE
.endif
pla
.endif
jmp IRQInd ; Jump to the saved IRQ vector