PAGE ; 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,#HMDTYP ;If Memory disk JE CBKD2 CMÐ 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 ; ; Print an unsigned binary number in ASCII ; Entry: (ax) number to be printed ; (bx) base to print number in ; putn: proc ld dx,#0 ;prepare for divide div bx ;Perform divide + modulo push dx ;save modulo cmp ax,#0 ;Test for digits remaining jz :pnum ;Go and print number call putn ;Crunch away at number :pnum: pop dx ;Get binary digit addb dl,#'0' ;Offset in binary cmpb dl,#'9'+1 ; jc :pndec ; addb dl,#'a'-'9'-1 ;Make hex if necessary :pndec: push dx push ax sto dl,[putbuf] ld bx,#putbuf call print pop ax pop dx ret putbuf: db 0,0 ;