a2audit/audit/resetall.asm

39 lines
636 B
NASM
Raw Normal View History

;;; 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.
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.
pla
2017-01-23 02:26:47 +00:00
tax
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-23 02:26:47 +00:00
;; Restore return address from X and A.
pha
2017-01-23 02:26:47 +00:00
txa
pha
2017-01-23 02:26:47 +00:00
ldx $300
lda $301
rts
}