*************************************************************** * * * Module Name: RESTORE.LIB Rev. 1.00 * * Function: Return drive head Last rev. 06 May 85 * * to track 0 By: glh/w6bsk * * * *************************************************************** * Equ table cmdreg equ 0fce3h ; Morrow DJ 1791 command port restor equ 0009h ; 1791 Type 1 restore command trak0 equ 0004h ; 1791 Track 0 mask restore: lxi h,cmdreg ; Point to 1791 command register mvi m,restor ; and enter the go-to-track-0 unbusy: ; command. mov m,a ; Load the status byte and test for rar ; busy. Keep checking until busy jnc unbusy ; flag is raised. busy: mov a,m ; Then loop until the busy flag rar ; goes down. jc busy mov a,m ; Load the status byte and test for ani trak0 ; at-track-0 flag. If flag is not jz reserr ; raised, do error jump. ret ; Else done, go home. reserr: call ccrlf call spmsg ; Display error db ' * Track 0 error: drive failure *',0 ret ; with z flag set.