GetFloppyType function prob

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
frank

Re:GetFloppyType function prob

Post by frank »

je = jmp,
jumps can't reutrn...
maybe that explains why it doesn't work..
Silenger

Re:GetFloppyType function prob

Post by Silenger »

Damm, better readed the complete turorial of asm programming ;D

Btw Thx frank for al the help ;)
Silenger

Re:GetFloppyType function prob

Post by Silenger »

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;
frank

Re:GetFloppyType function prob

Post by frank »

your welcome :)
Post Reply