1{ 2 This file is part of the Free Pascal run time library. 3 Copyright (c) 1999-2000 by Michael Van Canneyt 4 member of the Free Pascal development team 5 6 See the file COPYING.FPC, included in this distribution, 7 for details about the copyright. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 13 **********************************************************************} 14 15{$IFDEF VER3_0} 16{ Bootstrapping kludge. Note that these do nothing, but since I/O port access is 17 not necessary for bootstrapping on any x86_64 target, these are only added to 18 make the rtl compile with 3.0. 19} 20procedure fpc_x86_outportb(p:longint;v:byte); begin end; 21procedure fpc_x86_outportw(p:longint;v:word); begin end; 22procedure fpc_x86_outportl(p:longint;v:longint); begin end; 23function fpc_x86_inportb(p:word):byte; begin fpc_x86_inportb:=0; end; 24function fpc_x86_inportw(p:word):word; begin fpc_x86_inportw:=0; end; 25function fpc_x86_inportl(p:word):longint; begin fpc_x86_inportl:=0; end; 26{$ENDIF VER3_0} 27 28{ to give easy port access like tp with port[] } 29 30procedure tport.writeport(p : Longint;data : byte);inline; 31 32begin 33 fpc_x86_outportb(p,data) 34end; 35 36function tport.readport(p : Longint) : byte;inline; 37 38begin 39 readport := fpc_x86_inportb(p); 40end; 41 42procedure tportw.writeport(p : longint;data : word);inline; 43 44begin 45 fpc_x86_outportw(p,data) 46end; 47 48function tportw.readport(p : longint) : word;inline; 49 50begin 51 readport := fpc_x86_inportw(p); 52end; 53 54procedure tportl.writeport(p : longint;data : longint);inline; 55 56begin 57 fpc_x86_outportl(p,data) 58end; 59 60function tportl.readport(p : longint) : longint;inline; 61 62begin 63 readPort := fpc_x86_inportl(p); 64end; 65