Checks whether the specified block device contains a removable storage medium, such as a floppy disk.
Call with:
AH = 44H
AL = 08H
BL = drive number (0 = default, 1 = A, 2 = B, etc.)
Returns:
If function successful
Carry flag = clear
AL = 00H if medium is removable
01H if medium is not removable
If function unsuccessful
Carry flag = set
AX = error code
Notes:
If a file is not found as expected on a particular drive, a program can use this subfunction to determine whether the user should be prompted to insert another disk.
This subfunction may not be used for a network drive.
Block drivers are not required to support Subfunction 08H. If this subfunction is requested and the block device cannot supply the information, control returns to the program with the carry flag set and error code 0001H (invalid function) in register AX.
Example:
Check whether drive C is removable.
.
.
.
mov ax,4408h ; function & subfunction
mov bl,3 ; drive 3 = C
int 21h ; transfer to MS-DOS
jc error ; jump if function failed
and al,1 ; test type of medium
jnz fixed ; jump if not removable
.
.
.