From 117ba0b6061a1a5c415989f8990c4dc80248b13e Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Tue, 6 Oct 2020 20:50:33 -0700 Subject: [PATCH] disasm wip --- clock.system.s | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/clock.system.s b/clock.system.s index dfd3cc4..51045b3 100644 --- a/clock.system.s +++ b/clock.system.s @@ -437,22 +437,24 @@ install_ptr := * + 1 ;;; $06 is trashed .proc YearFromBCD + tmp := $06 + lda bcd_year pha lsr a lsr a lsr a lsr a - sta $06 + sta tmp asl a asl a - adc $06 + adc tmp asl a - sta $06 + sta tmp pla and #$0F clc - adc $06 + adc tmp sta year rts .endproc @@ -464,19 +466,21 @@ install_ptr := * + 1 ;;; $06 is trashed .proc ConvertToBCD + tmp := $06 + ldx #$FF : inx sec sbc #10 bcs :- adc #10 - sta $06 + sta tmp txa asl a asl a asl a asl a - ora $06 + ora tmp rts .endproc @@ -946,12 +950,12 @@ entries_loop: bne :- beq next_entry ; match - (but want *next* system file) -L1053: lda $05 +L1053: lda name_length sta open_pathname sta $0280 - inc $05 + inc name_length lda msg_num - cmp #$07 + cmp #7 beq L1070 ldy #MessageCode::kIIc jsr MaybeAddSeikoToMessage @@ -964,6 +968,7 @@ L1053: lda $05 L1070: ldy #MessageCode::kRunning jsr ShowMessage + ;; Copy and print pathname being invoked ldy #1 : lda (entry_ptr),y sta open_pathname,y @@ -971,7 +976,7 @@ L1070: ldy #MessageCode::kRunning ora #$80 jsr COUT iny - cpy $05 + cpy name_length bne :- jsr LoadSysFile