disasm wip

This commit is contained in:
Joshua Bell 2020-10-06 20:50:33 -07:00
parent c4a69301e8
commit 117ba0b606

View File

@ -437,22 +437,24 @@ install_ptr := * + 1
;;; $06 is trashed ;;; $06 is trashed
.proc YearFromBCD .proc YearFromBCD
tmp := $06
lda bcd_year lda bcd_year
pha pha
lsr a lsr a
lsr a lsr a
lsr a lsr a
lsr a lsr a
sta $06 sta tmp
asl a asl a
asl a asl a
adc $06 adc tmp
asl a asl a
sta $06 sta tmp
pla pla
and #$0F and #$0F
clc clc
adc $06 adc tmp
sta year sta year
rts rts
.endproc .endproc
@ -464,19 +466,21 @@ install_ptr := * + 1
;;; $06 is trashed ;;; $06 is trashed
.proc ConvertToBCD .proc ConvertToBCD
tmp := $06
ldx #$FF ldx #$FF
: inx : inx
sec sec
sbc #10 sbc #10
bcs :- bcs :-
adc #10 adc #10
sta $06 sta tmp
txa txa
asl a asl a
asl a asl a
asl a asl a
asl a asl a
ora $06 ora tmp
rts rts
.endproc .endproc
@ -946,12 +950,12 @@ entries_loop:
bne :- bne :-
beq next_entry ; match - (but want *next* system file) beq next_entry ; match - (but want *next* system file)
L1053: lda $05 L1053: lda name_length
sta open_pathname sta open_pathname
sta $0280 sta $0280
inc $05 inc name_length
lda msg_num lda msg_num
cmp #$07 cmp #7
beq L1070 beq L1070
ldy #MessageCode::kIIc ldy #MessageCode::kIIc
jsr MaybeAddSeikoToMessage jsr MaybeAddSeikoToMessage
@ -964,6 +968,7 @@ L1053: lda $05
L1070: ldy #MessageCode::kRunning L1070: ldy #MessageCode::kRunning
jsr ShowMessage jsr ShowMessage
;; Copy and print pathname being invoked
ldy #1 ldy #1
: lda (entry_ptr),y : lda (entry_ptr),y
sta open_pathname,y sta open_pathname,y
@ -971,7 +976,7 @@ L1070: ldy #MessageCode::kRunning
ora #$80 ora #$80
jsr COUT jsr COUT
iny iny
cpy $05 cpy name_length
bne :- bne :-
jsr LoadSysFile jsr LoadSysFile