mirror of
https://github.com/bobbimanners/Applecorn.git
synced 2024-06-17 17:30:55 +00:00
IENTAUX/IENTMAIN macros for IRQ handlers. No CLI!
This commit is contained in:
parent
0d93ec933c
commit
5313c6188e
BIN
applecorn.po
BIN
applecorn.po
Binary file not shown.
19
applecorn.s
19
applecorn.s
|
@ -128,6 +128,25 @@ ENTMAIN MAC
|
|||
CLI ; Re-enable IRQ after XFER
|
||||
EOM
|
||||
|
||||
* Macro called on re-entry to aux memory
|
||||
* For use in interrupt handlers (no CLI!)
|
||||
IENTAUX MAC
|
||||
LDX $0101 ; Recover alt SP
|
||||
TXS
|
||||
LDX STRTBCKL
|
||||
STX STRTL
|
||||
LDX STRTBCKH
|
||||
STX STRTH
|
||||
EOM
|
||||
|
||||
* Macro called on re-entry to main memory
|
||||
* For use in interrupt handlers (no CLI!)
|
||||
IENTMAIN MAC
|
||||
TXS ; Main SP already in X
|
||||
LDX $C081 ; Bank in ROM
|
||||
LDX $C081
|
||||
EOM
|
||||
|
||||
* Enable writing to main memory (for code running in aux)
|
||||
WRTMAIN MAC
|
||||
SEI ; Keeps IRQ handler easy
|
||||
|
|
|
@ -173,15 +173,15 @@ IRQBRKHDLR
|
|||
|
||||
:IRQ >>> XF2MAIN,A2IRQ ; Bounce to Apple IRQ handler
|
||||
IRQBRKRET
|
||||
>>> ENTAUX
|
||||
>>> IENTAUX ; IENTAUX does not do CLI
|
||||
PLA ; TODO: Pass on to IRQ1V
|
||||
TAX
|
||||
PLA
|
||||
NULLRTI RTI
|
||||
|
||||
* Invoked from GSBRK in main memory. On IIgs only.
|
||||
GSBRKAUX >>> ENTAUX
|
||||
JMP IRQBRKHDLR ; See if this works!!
|
||||
GSBRKAUX >>> IENTAUX ; IENTAUX does not do CLI
|
||||
JMP IRQBRKHDLR
|
||||
|
||||
PRERR LDY #$01
|
||||
PRERRLP LDA (FAULT),Y
|
||||
|
|
Loading…
Reference in New Issue
Block a user