Browse Source

* moved the compiler intrinsics for the i8086 'in' and 'out' instructions to the
system unit (with a 'fpc_x86_' prefix added)

git-svn-id: trunk@39368 -

nickysn 7 years ago
parent
commit
1c9d0d445b
2 changed files with 10 additions and 11 deletions
  1. 6 0
      rtl/i8086/cpuh.inc
  2. 4 11
      rtl/msdos/ports.pp

+ 6 - 0
rtl/i8086/cpuh.inc

@@ -26,3 +26,9 @@
   has_sse_support : boolean = false;
   has_mmx_support : boolean = false;
 
+function fpc_x86_inportb(port : word) : byte;[internproc:fpc_in_x86_inportb];
+function fpc_x86_inportw(port : word) : word;[internproc:fpc_in_x86_inportw];
+//function fpc_x86_inportl(port : word) : longint;[internproc:fpc_in_x86_inportl];
+procedure fpc_x86_outportb(port : word;data : byte);[internproc:fpc_in_x86_outportb];
+procedure fpc_x86_outportw(port : word;data : word);[internproc:fpc_in_x86_outportw];
+//procedure fpc_x86_outportl(port : word;data : longint);[internproc:fpc_in_x86_outportl];

+ 4 - 11
rtl/msdos/ports.pp

@@ -47,38 +47,31 @@ var
    portw : tportw;
    portl : tportl;
 
-function inportb(port : word) : byte;[internproc:fpc_in_x86_inportb];
-function inportw(port : word) : word;[internproc:fpc_in_x86_inportw];
-//function inportl(port : word) : longint;[internproc:fpc_in_x86_inportl];
-procedure outportb(port : word;data : byte);[internproc:fpc_in_x86_outportb];
-procedure outportw(port : word;data : word);[internproc:fpc_in_x86_outportw];
-//procedure outportl(port : word;data : longint);[internproc:fpc_in_x86_outportl];
-
   implementation
 
 { to give easy port access like tp with port[] }
 
 procedure tport.writeport(p : word;data : byte);inline;
 begin
-  outportb(p,data);
+  fpc_x86_outportb(p,data);
 end;
 
 
 function tport.readport(p : word) : byte;inline;
 begin
-  readport:=inportb(p);
+  readport:=fpc_x86_inportb(p);
 end;
 
 
 procedure tportw.writeport(p : word;data : word);inline;
 begin
-  outportw(p,data);
+  fpc_x86_outportw(p,data);
 end;
 
 
 function tportw.readport(p : word) : word;inline;
 begin
-  readport:=inportw(p);
+  readport:=fpc_x86_inportw(p);
 end;