Disable interrupts during aux memory access.

Interrupt handlers rather likely access text screen holes. Especially MSLOT is obligatory for every interrupt handler that requires access to an extension ROM ($C800-$CFFE) in order to be able to re-enable the extension ROM that was enabled when the interrupt occured. Those text screen holes only hold valid values in main memory so interrupts must be disabled while the aux memory text screen is mapped.
This commit is contained in:
Oliver Schmidt
2025-03-12 21:33:13 +01:00
parent fd4c1e193d
commit 7c2671be2a
3 changed files with 22 additions and 10 deletions

View File

@@ -9,6 +9,7 @@
.export _cgetc
.import cursor, putchardirect
.include "zeropage.inc"
.include "apple2.inc"
_cgetc:
@@ -22,7 +23,7 @@ _cgetc:
.else
lda #' ' | $40 ; Blank, flashing
.endif
jsr putchardirect ; Returns old character in X
jsr putchardirect ; Saves old character in tmp3
; Wait for keyboard strobe.
: inc RNDL ; Increment random counter low
@@ -37,7 +38,7 @@ _cgetc:
; Restore old character.
pha
txa
lda tmp3
jsr putchardirect
pla