mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 18:09:30 +02:00
* always enable portl (32-bit port access) in the i8086 ports unit
git-svn-id: trunk@37560 -
This commit is contained in:
parent
0695381709
commit
4f498c9e3c
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user