$F575/62837:   Write data block to disk

Jump from $F570:

F575: 20 E9 F5  JSR $F5E9       ; calculate parity for buffer
F578: 85 3A     STA $3A         ; and save
F57A: AD 00 1C  LDA $1C00       ; read port B
F57D: 29 10     AND #$10        ; isolate bit for 'write protect'
F57F: D0 05     BNE $F586       ; not set, ok
F581: A9 08     LDA #$08
F583: 4C 69 F9  JMP $F969       ; 26, 'write protect'

Jump from $F57F:

F586: 20 8F F7  JSR $F78F
F589: 20 10 F5  JSR $F510       ; find block header
F58C: A2 09     LDX #$09

Jump from $F58E, $F592:

F58E: 50 FE     BVC $F58E       ; byte ready?
F590: B8        CLV
F591: CA        DEX
F592: D0 FA     BNE $F58E
F594: A9 FF     LDA #$FF
F596: 8D 03 1C  STA $1C03       ; port A (read/write head) to output
F599: AD 0C 1C  LDA $1C0C
F59C: 29 1F     AND #$1F
F59E: 09 C0     ORA #$C0        ; change PCR to output
F5A0: 8D 0C 1C  STA $1C0C
F5A3: A9 FF     LDA #$FF
F5A5: A2 05     LDX #$05
F5A7: 8D 01 1C  STA $1C01       ; write $FF to disk 5 times
F5AA: B8        CLV

Jump from $F5AB, $F5AF:

F5AB: 50 FE     BVC $F5AB       ; as SYNC characters
F5AD: B8        CLV
F5AE: CA        DEX
F5AF: D0 FA     BNE $F5AB
F5B1: A0 BB     LDY #$BB

Jump from $F5BD:

F5B3: B9 00 01  LDA $0100,Y     ; bytes $1BB to $1FF to disk

Jump from $F5B6:

F5B6: 50 FE     BVC $F5B6
F5B8: B8        CLV
F5B9: 8D 01 1C  STA $1C01
F5BC: C8        INY
F5BD: D0 F4     BNE $F5B3

Jump from $F5C8:

F5BF: B1 30     LDA ($30),Y     ; write data buffer (256 bytes)

Jump from $F5C1:

F5C1: 50 FE     BVC $F5C1
F5C3: B8        CLV
F5C4: 8D 01 1C  STA $1C01
F5C7: C8        INY
F5C8: D0 F5     BNE $F5BF

Jump from $F5CA:

F5CA: 50 FE     BVC $F5CA       ; byte ready?
F5CC: AD 0C 1C  LDA $1C0C
F5CF: 09 E0     ORA #$E0        ; PCR to input again
F5D1: 8D 0C 1C  STA $1C0C
F5D4: A9 00     LDA #$00
F5D6: 8D 03 1C  STA $1C03       ; port A (read/write head) to input
F5D9: 20 F2 F5  JSR $F5F2
F5DC: A4 3F     LDY $3F
F5DE: B9 00 00  LDA $00,Y
F5E1: 49 30     EOR #$30        ; convert command code 'write' to 'verify'
F5E3: 99 00 00  STA $00,Y
F5E6: 4C B1 F3  JMP $F3B1

    Previous Page / Next Page