From 215d48739be74caac8f2c56f31b22990968018bb Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Tue, 30 Oct 2018 11:23:10 -0400 Subject: [PATCH] megaload: start merging in qkumba fixes this is theo "official" 65c02 -> 6502 conversion, which mostly matched mine --- megademo/megaload.s | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/megademo/megaload.s b/megademo/megaload.s index c238587b..9467e591 100644 --- a/megademo/megaload.s +++ b/megademo/megaload.s @@ -299,8 +299,8 @@ L5: adc #0 sta sizehi beq readfirst - ldy #0 ; was **stz secsize** - sty secsize + lda #0 ; was **stz secsize** + sta secsize readfirst: ldy #$0c @@ -308,11 +308,13 @@ readfirst: ; read a file sector readnext: + tya + pha lda dirbuf, y ; A = track ldx dirbuf+1, y ; x = sector - sty TEMPY ; save t/s ptr ** was phy ** jsr seekread1 - ldy TEMPY ; restore t/s ptr ** was ply ** + pla + tay ; if low count is non-zero then we are done ; (can happen only for partial last block)