(view source code of chkdrv.scr as plain text)
N CHKDRV.COM
A 100
OR AL,AL ;AL=0 if 1st drive valid
JZ 010A ; or FF if invalid
MOV AL,02 ;Return errorlevel=2
MOV AH,4C ;Terminate
INT 21 ; thru DOS
MOV DL,[005C] ;Get drive number+1
DEC DL ; subtract 1
JNS 0116 ; not negative if okay
MOV AL,03 ;Return errorlevel=3
JMP 0106 ; exit
MOV AH,04 ;Verify diskette fn
MOV AL,01 ; 1 sector
MOV CH,00 ; track 0
MOV CL,01 ; sector 1
MOV DH,00 ; side 0
INT 13 ; thru BIOS
JNC 012C ;NoCarry=okay
MOV AH,00 ;Reset diskette
INT 13 ; thru BIOS
MOV AL,01 ;Return errorlevel=1
JMP 0106 ; exit
MOV AL,00 ;Return errorlevel=1
JMP 0106 ; exit
RCX
30
W
Q
page last modified: 2024-04-16; loaded in 0.0163 seconds