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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user