*************************************************************** * * * Module Name: wnotbusy.lib Rev. 1.00 * * Function: Wait for busy flag Last rev. 06 May 85 * * to go down. By: glh/w6bsk * * * *************************************************************** * This routine has two entry points: UNBUSY loops until the BUSY flag goes up, then enters WTBUSY which loops until the BUSY flag is lowered. cmdreg equ 0fce3h ; Morrow DJ 1791 command port unbusy: lda cmdreg ; Load the status byte and ani 0001h ; mask for busy flag jz unbusy ; and loop until BUSY flag comes up. wtbusy: lda cmdreg ; Load it again and test for the ani 0001h ; BUSY flag to go down. jnz wtbusy ret