2017-01-17 03:45:29 +00:00
|
|
|
;;; Apple II/IIe reset-everything routine
|
|
|
|
;;; Copyright © 2017 Zellyn Hunter <zellyn@gmail.com>
|
|
|
|
|
|
|
|
!zone resetall {
|
|
|
|
|
2017-01-23 02:26:47 +00:00
|
|
|
;;; Reset all soft-switches to known-good state. Burns $300 and $301 in main mem.
|
2017-01-17 03:45:29 +00:00
|
|
|
RESETALL
|
2017-01-23 02:26:47 +00:00
|
|
|
sta RESET_RAMRD
|
|
|
|
sta RESET_RAMWRT
|
|
|
|
stx $300
|
|
|
|
sta $301
|
|
|
|
|
|
|
|
;; Save return address in X and A, in case we switch zero-page memory.
|
2017-01-17 03:45:29 +00:00
|
|
|
pla
|
2017-01-23 02:26:47 +00:00
|
|
|
tax
|
2017-01-17 03:45:29 +00:00
|
|
|
pla
|
|
|
|
|
2017-01-23 02:26:47 +00:00
|
|
|
sta RESET_80STORE
|
|
|
|
sta RESET_INTCXROM
|
|
|
|
sta RESET_ALTZP
|
|
|
|
sta RESET_SLOTC3ROM
|
|
|
|
sta RESET_INTC8ROM
|
2017-01-27 02:46:38 +00:00
|
|
|
sta RESET_80COL
|
|
|
|
sta RESET_ALTCHRSET
|
2017-01-23 02:26:47 +00:00
|
|
|
sta SET_TEXT
|
|
|
|
sta RESET_MIXED
|
|
|
|
sta RESET_PAGE2
|
|
|
|
sta RESET_HIRES
|
2017-01-17 03:45:29 +00:00
|
|
|
|
2017-01-23 02:26:47 +00:00
|
|
|
;; Restore return address from X and A.
|
2017-01-17 03:45:29 +00:00
|
|
|
pha
|
2017-01-23 02:26:47 +00:00
|
|
|
txa
|
2017-01-17 03:45:29 +00:00
|
|
|
pha
|
2017-01-23 02:26:47 +00:00
|
|
|
|
|
|
|
ldx $300
|
|
|
|
lda $301
|
2017-01-17 03:45:29 +00:00
|
|
|
rts
|
|
|
|
}
|