PAGE ;BIOS8 - Utility routines. ; Check blocked disk transfer. ; ; EXIT Cbit set, unblocked device. ; Cbit clear, blocked device. CHKBKD: proc STOB #0,ERFLAG ;Clear error flag LD AL,SEKTYP CMP AL,#DSKD1 JL CBKD2 ;If not blocked device CMP AL,#MAXFTP JG CBKD1 ;If hard disk LD AX,SEKTRK OR AX,AX LD AL,#DSKS1 ;A = Single density JZ CBKD2 ;If zero force non-blocked CBKD1: sto ds,bufseg LD AL,SAVSEC STO AL,SEKSEC CLC ;Clear carry flag RET SETACT: LD AL,SEKTYP CBKD2: STO AL,ACTTYP ;Set actual disk type LD AX,DMAADR STO AX,BUFADR LD BX,DMASEG STO BX,BUFSEG LD AL,SEKDSK STO AL,ACTDSK LD BX,SEKTRK STO BX,ACTTRK LD AL,SAVSEC STO AL,ACTSEC STC ;Set carry flag RET SPACE 4,10 ; Delay Delay the millisecond count contained in BC. ; ; Destroys A and flags. DELAY: LD AL,#DELCNT/21 DLAY1: DEC AL JNZ DLAY1 ;If not 1 millisecond LOOP DELAY ;If not desired count :4 RET SPACE 4,10 ; Print message terminated by zero byte. ; ; ENTRY BX-> message buffer, terminated by zero. ; ; EXIT BX-> zero byte + 1. ; A = 0. ; Z bit set. ; ; Destroys only BX, Flags, and A registers. :6: PUSH CX MOV CL,AL CALL J.COUT ;Output to the console POP CX PRINT: LD AL,[bx] ;Get a character INC BX TEST AL,AL JNZ :6 ;if no EOS RET ; Endx Bios8