je = jmp,
jumps can't reutrn...
maybe that explains why it doesn't work..
GetFloppyType function prob
Re:GetFloppyType function prob
Damm, better readed the complete turorial of asm programming ;D
Btw Thx frank for al the help
Btw Thx frank for al the help
Re:GetFloppyType function prob
This one works
function GetFloppyType(Drive: TFloppyDrive): TFloppyType;
var
dResult: TFloppyType;
begin
asm
PUSH Ax
PUSH Dx
MOV Ah, 08h
MOV Dl, Drive
INT 13h
{Result}
CMP Ah, 0
JNZ @None
CMP Ah, 0
JZ @Get
@None:
MOV dResult, 0
@Get:
MOV dResult, Bl
POP Dx
POP Ax
end;
GetFloppyType := dResult;
end;
function GetFloppyType(Drive: TFloppyDrive): TFloppyType;
var
dResult: TFloppyType;
begin
asm
PUSH Ax
PUSH Dx
MOV Ah, 08h
MOV Dl, Drive
INT 13h
{Result}
CMP Ah, 0
JNZ @None
CMP Ah, 0
JZ @Get
@None:
MOV dResult, 0
@Get:
MOV dResult, Bl
POP Dx
POP Ax
end;
GetFloppyType := dResult;
end;