* always enable portl (32-bit port access) in the i8086 ports unit

git-svn-id: trunk@37560 -
This commit is contained in:
nickysn 2017-11-06 16:32:36 +00:00
parent 0695381709
commit 4f498c9e3c

View File

@ -16,15 +16,6 @@
unit ports;
{$if defined(CPU80386)
or defined(CPUPENTIUM)
or defined(CPUPENTIUM2)
or defined(CPUPENTIUM3)
or defined(CPUPENTIUM4)
or defined(CPUPENTIUMM)}
{$define CPU_IS_386_OR_LATER}
{$endif}
interface
type
@ -40,22 +31,19 @@ type
property pp[w : word] : word read readport write writeport;default;
end;
{$ifdef CPU_IS_386_OR_LATER}
tportl = object
procedure writeport(p : word;data : longint);
function readport(p : word) : longint;
property pp[w : word] : longint read readport write writeport;default;
end;
{$endif CPU_IS_386_OR_LATER}
var
{ we don't need to initialize port, because neither member
variables nor virtual methods are accessed }
port,
portb : tport;
portw : tportw;
{$ifdef CPU_IS_386_OR_LATER}
portl : tportl;
{$endif CPU_IS_386_OR_LATER}
implementation
@ -91,7 +79,7 @@ asm
end;
{$ifdef CPU_IS_386_OR_LATER}
{$asmcpu 80386}
procedure tportl.writeport(p : word;data : longint);assembler;
asm
mov dx, p
@ -107,6 +95,5 @@ asm
mov edx, eax
shr edx, 16
end;
{$endif CPU_IS_386_OR_LATER}
end.