$F510/62736:   Read block header

Jump from $F50A, $F589, $F6CA:

F510: A5 3D     LDA $3D         ; drive number
F512: 0A        ASL
F513: AA        TAX
F514: B5 12     LDA $12,X       ; ID1
F516: 85 16     STA $16         ; save
F518: B5 13     LDA $13,X       ; ID2
F51A: 85 17     STA $17         ; save
F51C: A0 00     LDY #$00
F51E: B1 32     LDA ($32),Y     ; get track and
F520: 85 18     STA $18
F522: C8        INY
F523: B1 32     LDA ($32),Y     ; sector number from buffer
F525: 85 19     STA $19
F527: A9 00     LDA #$00
F529: 45 16     EOR $16
F52B: 45 17     EOR $17         ; calculate parity for block header
F52D: 45 18     EOR $18
F52F: 45 19     EOR $19
F531: 85 1A     STA $1A         ; and save
F533: 20 34 F9  JSR $F934
F536: A2 5A     LDX #$5A        ; 90 attempts

Jump from $F54F:

F538: 20 56 F5  JSR $F556       ; wait for SYNC
F53B: A0 00     LDY #$00

Jump from $F53D, $F54B:

F53D: 50 FE     BVC $F53D       ; byte ready?
F53F: B8        CLV
F540: AD 01 1C  LDA $1C01       ; read data from block header
F543: D9 24 00  CMP $24,Y       ; compare with saved data
F546: D0 06     BNE $F54E       ; not the same, try again
F548: C8        INY
F549: C0 08     CPY #$08        ; 8 bytes read?
F54B: D0 F0     BNE $F53D       ; no
F54D: 60        RTS

Jump from $F546:

F54E: CA        DEX             ; decrement counter
F54F: D0 E7     BNE $F538       ; not yet zero?
F551: A9 02     LDA #$02

Jump from $F560:

F553: 4C 69 F9  JMP $F969       ; 20, 'read error'

    Previous Page / Next Page