$F3B1/62385: Read block header, verify ID Jump from $F36B, $F5E6: F3B1: A2 5A LDX #$5A ; 90 F3B3: 86 4B STX $4B ; counter F3B5: A2 00 LDX #$00 F3B7: A9 52 LDA #$52 ; 82 F3B9: 85 24 STA $24 Jump from $F409: F3BB: 20 56 F5 JSR $F556 ; wait for SYNC Jump from $F3BE: F3BE: 50 FE BVC $F3BE ; byte ready? F3C0: B8 CLV F3C1: AD 01 1C LDA $1C01 ; data from read head F3C4: C5 24 CMP $24 F3C6: D0 3F BNE $F407 ; 20, 'read error' Jump from $F3C8, $F3D3: F3C8: 50 FE BVC $F3C8 ; byte ready? F3CA: B8 CLV F3CB: AD 01 1C LDA $1C01 ; data byte from disk (block header) F3CE: 95 25 STA $25,X ; save 7 bytes F3D0: E8 INX F3D1: E0 07 CPX #$07 F3D3: D0 F3 BNE $F3C8 ; continue reading F3D5: 20 97 F4 JSR $F497 F3D8: A0 04 LDY #$04 ; 4 bytes plus parity F3DA: A9 00 LDA #$00 Jump from $F3E0: F3DC: 59 16 00 EOR $16,Y ; form checksum for header F3DF: 88 DEY F3E0: 10 FA BPL $F3DC F3E2: C9 00 CMP #$00 ; parity ok? F3E4: D0 38 BNE $F41E ; 27, 'read error' F3E6: A6 3E LDX $3E ; drive number F3E8: A5 18 LDA $18 ; track number of header F3EA: 95 22 STA $22,X ; use as actual track number F3EC: A5 45 LDA $45 F3EE: C9 30 CMP #$30 ; code for 'preserve header' F3F0: F0 1E BEQ $F410 ; preserve header F3F2: A5 3E LDA $3E F3F4: 0A ASL F3F5: A8 TAY F3F6: B9 12 00 LDA $12,Y F3F9: C5 16 CMP $16 ; command with ID1 F3FB: D0 1E BNE $F41B F3FD: B9 13 00 LDA $13,Y F400: C5 17 CMP $17 ; command with ID2 F402: D0 17 BNE $F41B ; <>, then 29, 'disk id mismatch' F404: 4C 23 F4 JMP $F423 Jump from $F3C6: F407: C6 4B DEC $4B ; decrement counter for attempts F409: D0 B0 BNE $F3BB ; and try again F40B: A9 02 LDA #$02 ; else F40D: 20 69 F9 JSR $F969 ; 20, 'read error' Previous Page / Next Page |