Hardware Delphi

function IsCDROM(DriveNum: Integer): Boolean; assembler;
asm
MOV AX,1500h { MSCDEX 'e bakıyor}
XOR BX,BX
INT 2fh
OR BX,BX
JZ @Finish
MOV AX,150Bh { CD driver ın kullanılırlığına bakıyor}
MOV CX,DriveNum
INT 2fh
OR AX,AX
@Finish:
end;
// Win32 kontrolörlü
A:
Function IsCdRom(DriveNum : Word) : Boolean;
Var
F : WordBool;
Begin
asm
mov ax, 1500h
xor bx, bx
int 2fh
mov ax, bx
or ax, ax
jz @no_mscdex
mov ax, 150bh
mov cx, DriveNum
int 2fh
@no_mscdex:
mov f,ax
end;
Result := F;
End;