* fixed readport* functions (thanks Florian ;)

This commit is contained in:
Jonas Maebe 2000-03-27 13:25:48 +00:00
parent a6910bcb41
commit 36df88a15d

View File

@ -3828,44 +3828,39 @@ end;
function ReadPortB (Port : Longint): Byte; function ReadPortB (Port : Longint): Byte; assembler;
{ {
Reads a byte from port 'Port' Reads a byte from port 'Port'
} }
begin
asm asm
xorl %eax,%eax xorl %eax,%eax
movl port,%edx movl port,%edx
inb %dx,%al inb %dx,%al
end ['EAX','EDX']; end ['EAX','EDX'];
end;
function ReadPortW (Port : Longint): Word; function ReadPortW (Port : Longint): Word; assembler;
{ {
Reads a word from port 'Port' Reads a word from port 'Port'
} }
begin
asm asm
xorl %eax,%eax xorl %eax,%eax
movl port,%edx movl port,%edx
inw %dx,%ax inw %dx,%ax
end ['EAX','EDX']; end ['EAX','EDX'];
end;
function ReadPortL (Port : Longint): LongInt; function ReadPortL (Port : Longint): LongInt; assembler;
{ {
Reads a LongInt from port 'Port' Reads a LongInt from port 'Port'
} }
begin
asm asm
movl port,%edx movl port,%edx
inl %dx,%eax inl %dx,%eax
end ['EAX','EDX']; end ['EAX','EDX'];
end;
@ -3930,7 +3925,10 @@ End.
{ {
$Log$ $Log$
Revision 1.65 2000-03-23 17:10:32 jonas Revision 1.66 2000-03-27 13:25:48 jonas
* fixed readport* functions (thanks Florian ;)
Revision 1.65 2000/03/23 17:10:32 jonas
* fixes for port reading * fixes for port reading
Revision 1.64 2000/03/17 13:27:00 sg Revision 1.64 2000/03/17 13:27:00 sg