*************************************************************** * * * Module Name: WAITINDX.LIB Rev. 1.00 * * Function: Wait until index Last rev. 06 May 85 * * hole has been found - and gone. By: glh/w6bsk * * * *************************************************************** wtindx: lxi b,0000h ; Preset trip count. windxh: lda djstat ; Get the drive status byte ani ndxmsk ; and mask for index pulse. jz trpcnt ; Keep track of tries windxl: lda djstat ; Load status byte again ani ndxmsk ; and this time look for jnz windxl ; the end of the index pulse. ret ; Then return. trpcnt: inr c ; Update trip counter jnz windxh ; and keep looking inr b ; Try for 256 times jnz windxh ; before dropping out. call ccrlf call spmsg db ' Unable to detect index pulse: ',0 call ccrlf call spmsg db ' Drive failure occurred.',0 ret