1{
2    This file is part of the Free Pascal run time library.
3    and implements some stuff for protected mode programming
4    Copyright (c) 1999-2000 by the Free Pascal development team.
5
6    These files adds support for TP styled port accesses
7
8    See the file COPYING.FPC, included in this distribution,
9    for details about the copyright.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
15 **********************************************************************}
16
17type
18{$ifdef VER3_0}
19   tport = object
20      procedure writeport(p : word;data : byte);stdcall;
21      function  readport(p : word) : byte;stdcall;
22      property pp[w : word] : byte read readport write writeport;default;
23   end;
24
25   tportw = object
26      procedure writeport(p : word;data : word);stdcall;
27      function  readport(p : word) : word;stdcall;
28      property pp[w : word] : word read readport write writeport;default;
29   end;
30
31   tportl = object
32      procedure writeport(p : word;data : longint);stdcall;
33      function  readport(p : word) : longint;stdcall;
34      property pp[w : word] : longint read readport write writeport;default;
35   end;
36{$else VER3_0}
37   tport = object
38   private
39      procedure writeport(p : word;data : byte);inline;
40      function  readport(p : word) : byte;inline;
41   public
42      property pp[w : word] : byte read readport write writeport;default;
43   end;
44
45   tportw = object
46   private
47      procedure writeport(p : word;data : word);inline;
48      function  readport(p : word) : word;inline;
49   public
50      property pp[w : word] : word read readport write writeport;default;
51   end;
52
53   tportl = object
54   private
55      procedure writeport(p : word;data : longint);inline;
56      function  readport(p : word) : longint;inline;
57   public
58      property pp[w : word] : longint read readport write writeport;default;
59   end;
60{$endif VER3_0}
61var
62{ we don't need to initialize port, because neither member
63  variables nor virtual methods are accessed }
64   port,
65   portb : tport;
66   portw : tportw;
67   portl : tportl;
68