From b9466753413f117fe6616d16bc130a5c4202890b Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Thu, 8 Aug 2019 17:58:57 +0200 Subject: [PATCH] changed VECTOR temporary storage address --- c64/aliases/,aliases_ram_lowmem.s | 1 + c64/kernal/vector.s | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/c64/aliases/,aliases_ram_lowmem.s b/c64/aliases/,aliases_ram_lowmem.s index c9f4ce6d..6108e28e 100644 --- a/c64/aliases/,aliases_ram_lowmem.s +++ b/c64/aliases/,aliases_ram_lowmem.s @@ -45,6 +45,7 @@ .alias FNADDR $BB ; $BB-$BC, current file name pointer .alias STAL $C1 ; $C1-$C2 LOAD/SAVE start address + .alias MEMUS $C3 ; $C3-$C4 temporary address for tape LOAD/SAVE ;; ;; Other low memory addresses diff --git a/c64/kernal/vector.s b/c64/kernal/vector.s index 9afc2ef8..c5ed62ba 100644 --- a/c64/kernal/vector.s +++ b/c64/kernal/vector.s @@ -20,8 +20,10 @@ vector: .scope - ;; Temporary storage location - .alias _caller_arr_ptr CMP0 + ;; Temporary storage location - checked on real C64 that this is the + ;; address originally used; after calling VECTOR and checking zero page + ;; area afterwards, the address could be found there + .alias _caller_arr_ptr MEMUS ;; According to 'Compute's Mapping the Commodore 64' page 237, ;; the CBM implementation does not disable IRQs - yet, the @@ -32,9 +34,10 @@ vector: php cli - ;; Prepare the user data pointer - stx _caller_arr_ptr + 0 + ;; Prepare the user data pointer - strange order to reduce risk + ;; of potential similarity to the original routine sty _caller_arr_ptr + 1 + stx _caller_arr_ptr + 0 ;; Select routine variant - store or restore vectors ldy #$1F