From: ol.sc
Date: Sun, 13 Sep 2009 19:50:09 +0000 (+0000)
Subject: Being loaded by my 'ProDOS Loader' needs to be classified as being loaded as BIN...
X-Git-Tag: V2.13.0rc1~88
X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b7df1ed5d485fbf39b4dd2078631d369ee292224;p=cc65
Being loaded by my 'ProDOS Loader' needs to be classified as being loaded as BIN from an interpreter (and not as SYS). But the 'ProDOS Loader' zeros the system bitmap up to the system global page (this is what it's about) so additionally check page $03 protection which is zero when loaded as SYS but one when loaded by 'ProDOS Loader 1.4'.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4168 b7a2c559-68d2-44c3-8de9-860c34a00d81
---
diff --git a/libsrc/apple2/crt0.s b/libsrc/apple2/crt0.s
index 9ba7f9534..b0ffabf1c 100644
--- a/libsrc/apple2/crt0.s
+++ b/libsrc/apple2/crt0.s
@@ -165,8 +165,12 @@ init: ldx #zpspace-1
bne basic
; Check ProDOS system bit map
+ lda $BF58 ; protection for pages $00 - $07
+ and #%11110000 ; ignore protection of text pages
+ cmp #%11000000 ; only zero and stack pages are protected
+ bne basic
lda $BF6F ; protection for pages $B8 - $BF
- cmp #%00000001 ; exactly page $BF is protected
+ cmp #%00000001 ; exactly system global page is protected
bne basic
; No BASIC.SYSTEM so quit to ProDOS dispatcher instead