Prev: F6FB Up: Map Next: F76A
F72C: find the tape header, exit with header in buffer
Used by the routines at F34A, F533 and F7EA.
F72C A5 93 LDA $93 get load/verify flag
F72E 48 PHA save load/verify flag
F72F 20 41 F8 JSR $F841 initiate tape read
F732 68 PLA restore load/verify flag
F733 85 93 STA $93 save load/verify flag
F735 B0 32 BCS $F769 exit if error
F737 A0 00 LDY #$00 clear the index
F739 B1 B2 LDA ($B2),Y read first byte from tape buffer
F73B C9 05 CMP #$05 compare with logical end of the tape
F73D F0 2A BEQ $F769 if end of the tape exit
F73F C9 01 CMP #$01 compare with header for a relocatable program file
F741 F0 08 BEQ $F74B if program file header go ??
F743 C9 03 CMP #$03 compare with header for a non relocatable program file
F745 F0 04 BEQ $F74B if program file header go ??
F747 C9 04 CMP #$04 compare with data file header
F749 D0 E1 BNE $F72C if data file loop to find the tape header
was a program file header
F74B AA TAX copy header type
F74C 24 9D BIT $9D get message mode flag
F74E 10 17 BPL $F767 exit if control messages off
F750 A0 63 LDY #$63 index to "FOUND "
F752 20 2F F1 JSR $F12F display kernel I/O message
F755 A0 05 LDY #$05 index to the tape filename
F757 B1 B2 LDA ($B2),Y get byte from tape buffer
F759 20 D2 FF JSR $FFD2 output character to channel
F75C C8 INY increment the index
F75D C0 15 CPY #$15 compare it with end+1
F75F D0 F6 BNE $F757 loop if more to do
F761 A5 A1 LDA $A1 get the jiffy clock mid byte
F763 20 E0 E4 JSR $E4E0 wait ~8.5 seconds for any key from the STOP key column
F766 EA NOP waste cycles
F767 18 CLC flag no error
F768 88 DEY decrement the index
F769 60 RTS
Prev: F6FB Up: Map Next: F76A