检测是否是CDROM:
Function IsCDROM(Drv : Char):BOOLEAN;
Var
CDR : string;
cnt : byte;
Count,First : word;
begin
Result := false;
CDR := '';
asm
mov ax, 1500h
xor bx, bx
int $2f //CDROM中断
les di, COUNT
mov es:[di], bx
les di, FIRST
mov es:[di], cx
end;
if Count > 0 then
for cnt := 0 to (Count-1) do
CDR := CDR + char(First + Byte('A') + cnt);
Result := (Pos(upcase(Drv),CDR) > 0);
end;