From f0b5b0296678dde02aa2c46096a7dee59cc4b9f4 Mon Sep 17 00:00:00 2001 From: Colin Leroy-Mira Date: Sun, 21 Jan 2024 16:50:59 +0100 Subject: [PATCH] Swap in LC before destructors, ROM after --- doc/apple2.sgml | 2 +- doc/apple2enh.sgml | 2 +- libsrc/apple2/crt0.s | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/apple2.sgml b/doc/apple2.sgml index 3a3ec3666..e6ec870ee 100644 --- a/doc/apple2.sgml +++ b/doc/apple2.sgml @@ -62,7 +62,7 @@ Special locations:

While running

While running exit jsr reset ; Setup RESET vector - ; Switch in ROM, in case it wasn't already switched in by a RESET. - bit $C082 + ; Switch in LC bank 2 for R/O in case it was switched out by a RESET. + bit $C080 ; Call the module destructors. jsr donelib + ; Switch in ROM. + bit $C082 + ; Restore the original RESET vector. exit: ldx #$02 : lda rvsave,x