From 7d2a2f8605fef5ab5faf7dae29b5ceed552af061 Mon Sep 17 00:00:00 2001 From: Martin Haye Date: Tue, 25 Aug 2026 17:11:09 -0700 Subject: [PATCH] In FIND_IN_MEM, don't treat inactive resource as found - caller is checking for active only --- Platform/Apple/virtual/src/core/mem.s | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Platform/Apple/virtual/src/core/mem.s b/Platform/Apple/virtual/src/core/mem.s index 26615b0f..e3f50524 100644 --- a/Platform/Apple/virtual/src/core/mem.s +++ b/Platform/Apple/virtual/src/core/mem.s @@ -1815,9 +1815,12 @@ mem_find: beq .notFound ; nope, pass to next loader .found stx segNum ; save seg num for later lda tSegType,x ; get flags - ora #$80 ; reactivate if necessary + bmi .alrAct ; if already active, no need to re-activate + bit .findonly ; in find mode... + bmi .notFound ; ...don't count inactive as found (caller is checking for active) + ora #$80 ; reactivate sta tSegType,x ; save modified flag - lda tSegAdrHi,x ; get seg address hi +.alrAct lda tSegAdrHi,x ; get seg address hi tay ; in Y for return lda tSegAdrLo,x ; addr lo tax ; in X for return