Main Index Routine Index Memory Index
Previous Page Next Page


Routine $0558:   Locate Track 36 Key Sector, enforce Job #4 (execute $0700 Track 36 handler),
                 run file transfer management routine

This routine gets called when the head is still on the Directory sector 18. It moves the head from Track to Track (Track number +1 each time) counting byte-readys on each Track. If there are too few byte-readys and a sufficiently very long SYNC mark, then Track 36 is found. The IRQ Timer runs out and triggers Job #4 execution ($0700 Track 36 handler). If Job #4 is finished, execution is passed to the $0587 file transfer management routine. If RapidLok is not executed for the first time on a disk side, Track 36 detection and handling is skipped and execution directly passed to the $0587 file transfer management routine.

JSR from $07D2: 0558: 49 6B EOR #$6B 055A: 48 PHA 055B: 20 B6 06 JSR $06B6 ; step motor movement to Track 19 (from Track 18), set Bit rate. 055E: 20 2A 05 JSR $052A ; Find DOS reference sector on current track (integrity check) 0561: 68 PLA 0562: F0 23 BEQ $0587 ; if this $0558 routine is called with A=$6B skip following Track 36 handling Jump from $0585: 0564: 20 B2 06 JSR $06B2 ; step motor movement to higher Track (Track number +1), set Bit rate & Job #4. 0567: AD 00 1C LDA $1C00 ; get current drive config (i.e. Bit rate) 056A: 49 60 EOR #$60 ; $60=01100000b -> switch Bit rate 056C: 20 E8 06 JSR $06E8 ; set new Bit rate 056F: 20 0D 05 JSR $050D ; Count byte-readys (->[$0150]) until next SYNC mark, CF:=0 if SYNC found. 0572: 50 FE BVC $0572 ; wait for byte-ready (for first byte after SYNC mark) 0574: A0 FD LDY #$FD ; byte-ready counter: max 253 byte-readys allowed per Track (Track 36 Key Sector data is 250-252 bytes embedded in very long SYNC mark) 0576: 8C 05 1C STY $1C05 ; set IRQ Timer for Job #4 execution (Track 36 handler) Jump from $057E, $0583: 0579: 58 CLI ; enable Kernal Job loop management 057A: A6 04 LDX $04 ; get Job #4 status/result (was set to $D0-execute $0700) 057C: 10 09 BPL $0587 ; branch if Job #4 status/result finished ok (Track 36 handler) 057E: 50 F9 BVC $0579 ; check Job #4 status/result while no byte-ready 0580: 78 SEI 0581: B8 CLV ; clear byte-ready status 0582: 88 DEY ; byte-ready -> decrease Y-counter 0583: D0 F4 BNE $0579 0585: F0 DD BEQ $0564 ; Y=0: Y-countdown faster than IRQ Timer (too many byte-readys on Track), ; move to next Track (Track number +1) and try again. Previous Page / Next Page