asm in delphi - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

asm in delphi

merdanusmerdanus Posts: 24Member
hi, can anyone help me wiz it.i'm using delphi 7:
----------------------------------
it controls CD-ROM
----------------------------------
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;

// controlled with Win32
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;


Sign In or Register to comment.