From 404af7500c360724f3b3043a5301d321ff7d9ed2 Mon Sep 17 00:00:00 2001 From: mc78 Date: Mon, 26 Aug 2024 00:47:25 +0200 Subject: [PATCH] Added check that given screen addr hi is not between $1000-$1fff nor between $9000-$9fff due to shadowing --- libsrc/cbm/workingscreenaddr.s | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libsrc/cbm/workingscreenaddr.s b/libsrc/cbm/workingscreenaddr.s index a2780dce6..7c2d1f488 100644 --- a/libsrc/cbm/workingscreenaddr.s +++ b/libsrc/cbm/workingscreenaddr.s @@ -13,6 +13,16 @@ _cbm_set_working_screen: tax and #3 bne @error + cpx #$10 ; Screen addr must not be set to $1000-$1fff nor $9000-$9fff + bcc @ok_1000 + cpx #$1f + bcc @error + @ok_1000: + cpx #$90 ; Screen addr must not be set to $1000-$1fff nor $9000-$9fff + bcc @ok_9000 + cpx #$9f + bcc @error + @ok_9000: stx SCREEN_HI sec jsr PLOT ; Get cursor position ...