Ver Fonte

+ 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 -

nickysn há 7 anos atrás
pai
commit
62fe6cb5d3
2 ficheiros alterados com 17 adições e 5 exclusões
  1. 14 5
      rtl/msdos/ports.pp
  2. 3 0
      rtl/msdos/system.pp

+ 14 - 5
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.  }
 
-implementation
+type
+  tport = System.tport;
+  tportw = System.tportw;
+  tportl = System.tportl;
 
-{$I ports.inc}
+var
+   port  : tport absolute System.port;
+   portb : tport absolute System.portb;
+   portw : tportw absolute System.portw;
+   portl : tportl absolute System.portl;
+
+implementation
 
 end.

+ 3 - 0
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