     $C63D/50749:   Test and initalise drive

    Jump from $C409, $C416, $C423, $C434, $CB8C:

    C63D: A5 68     LDA $68
    C63F: D0 28     BNE $C669
    C641: A6 7F     LDX $7F         ; drive number
    C643: 56 1C     LSR $1C,X       ; disk changed?
    C645: 90 22     BCC $C669       ; no, then done
    C647: A9 FF     LDA #$FF
    C649: 8D 98 02  STA $0298       ; set error flag
    C64C: 20 0E D0  JSR $D00E       ; read directory track
    C64F: A0 FF     LDY #$FF
    C651: C9 02     CMP #$02        ; 20, 'read error'?
    C653: F0 0A     BEQ $C65F       ; yes
    C655: C9 03     CMP #$03        ; 21, 'read error'?
    C657: F0 06     BEQ $C65F       ; yes
    C659: C9 0F     CMP #$0F        ; 74, 'drive not ready'?
    C65B: F0 02     BEQ $C65F       ; yes
    C65D: A0 00     LDY #$00

    Jump from $C653, $C657, $C65B:

    C65F: A6 7F     LDX $7F         ; drive number
    C661: 98        TYA
    C662: 95 FF     STA $FF,X       ; save error flag
    C664: D0 03     BNE $C669       ; error?
    C666: 20 42 D0  JSR $D042       ; load BAM

    Jump from $C63F, $C645, $C664:

    C669: A6 7F     LDX $7F         ; drive number
    C66B: B5 FF     LDA $FF,X       ; transmit error code
    C66D: 60        RTS

        Previous Page / Next Page