Main Index Routine Index Memory Index
Previous Page Next Page


Routine $0604:   Recalibrate head onto Track

This routine moves the Step motor to a lower Halftrack and back to the upper Track. The loop is always executed twice: first cycle (loop variable number is even) moves the head to the lower Halftrack, second moves the head back to the Track. Finally the Drive LED is turned off. If [$C6]=0 then CF:=1 is returned (error).

JSR from $0484, $054C, Jump from $061B: 0604: C6 C6 DEC $C6 ; initial value is [$C6]=9 0606: F0 FA BEQ $0602 ; no tries left -> $0602 returns with CF:=1 (error) 0608: A5 C6 LDA $C6 060A: 29 03 AND #$03 ; $071F-Index: 8/7: 0/3, 6/5: 2/1, 4/3: 0/3, 2/1: 2/1 060C: AA TAX 060D: BC 1F 07 LDY $071F,X ; Step motor movement ctrl: 8/7: FF/01, 6/5: 01/FF, 4/3: FF/01, 2/1: 01/FF ; FF = move half Track outwards, 01 = move half Track inwards 0610: 20 C2 06 JSR $06C2 ; Move head custom number of Halftracks (+/- Y), set Bit rate. 0613: AA TAX 0614: 20 F3 06 JSR $06F3 ; Bit shift memory area [$0420-($0420+X)], set [$79]:=$FD. 0617: A5 C6 LDA $C6 0619: 29 01 AND #$01 061B: F0 E7 BEQ $0604 ; if [$C6] value is even -> first loop done -> run second/final loop 061D: AD 00 1C LDA $1C00 0620: 29 F7 AND #$F7 ; $F7=11110111b: Drive LED = Off 0622: 4C E8 06 JMP $06E8 ; turn Drive LED off, keep everything else (i.e. Bit rate) Previous Page / Next Page