From 62fe6cb5d368cccf1bb90473c041b12f26618372 Mon Sep 17 00:00:00 2001 From: nickysn Date: Mon, 9 Jul 2018 15:40:12 +0000 Subject: [PATCH] + integrated the port access via Port[] in the i8086-msdos system unit to ease porting TP7 code. The ports unit also remains for compatibility with code that has already been ported to FPC. git-svn-id: trunk@39422 - --- rtl/msdos/ports.pp | 19 ++++++++++++++----- rtl/msdos/system.pp | 3 +++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/rtl/msdos/ports.pp b/rtl/msdos/ports.pp index fa6ad66f84..cb8a61102e 100644 --- a/rtl/msdos/ports.pp +++ b/rtl/msdos/ports.pp @@ -16,14 +16,23 @@ unit ports; -{$inline on} - interface -{$I portsh.inc} +{ Since this platform has port access built into the System unit, this unit just + creates aliases, for compatibility for programs, that already use the ports + unit. } + +type + tport = System.tport; + tportw = System.tportw; + tportl = System.tportl; + +var + port : tport absolute System.port; + portb : tport absolute System.portb; + portw : tportw absolute System.portw; + portl : tportl absolute System.portl; implementation -{$I ports.inc} - end. diff --git a/rtl/msdos/system.pp b/rtl/msdos/system.pp index db7d0fdda8..b71af5d480 100644 --- a/rtl/msdos/system.pp +++ b/rtl/msdos/system.pp @@ -32,6 +32,7 @@ interface {$I systemh.inc} {$I tnyheaph.inc} +{$I portsh.inc} const LineEnding = #13#10; @@ -265,6 +266,8 @@ Procedure SysInitFPU; {$I tinyheap.inc} +{$I ports.inc} + procedure DebugWrite(const S: string); begin asm