From 4d4a164e308fba229f6388908b409d9381155117 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Fri, 14 Jun 2019 21:00:53 -0700 Subject: [PATCH] Signature bytes --- ram.system.s | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ram.system.s b/ram.system.s index 018728c..583b536 100644 --- a/ram.system.s +++ b/ram.system.s @@ -3,12 +3,14 @@ .setcpu "6502" .include "apple2.inc" + .include "apple2.mac" .include "inc/macros.inc" .include "inc/apple2.inc" .include "inc/prodos.inc" .include "opcodes.inc" +zp_sig_addr := $06 zpproc_addr := $B0 zpproc_relay_addr := $2D0 @@ -304,9 +306,9 @@ break: beq fail ;; Check for ZP signature - if not found, set it and install. - ldx #2 -: lda L23A0,x - cmp $06,x + ldx #sig_len-1 +: lda sig,x + cmp zp_sig_addr,x bne set_sig dex bpl :- @@ -317,9 +319,9 @@ break: fail: jmp do_chain -sloop: lda L23A0,x +sloop: lda sig,x set_sig: - sta $06,x + sta zp_sig_addr,x dex bpl sloop @@ -570,7 +572,9 @@ num_banks_minus_one: .byte 0 L239F: .byte 0 -L23A0: .byte $C7, $C5, $C2 ; signature sequence ??? + +sig: scrcode "GEB" ; signature sequence - Glen E. Bredon + sig_len = * - sig ;; Volume Directory Header .proc vol_dir_header