mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 14:09:17 +02:00
* set the stdcall calling convention explicitly for each method, that requires
it, instead of using {$calling stdcall} in the go32v2 ports unit git-svn-id: trunk@39402 -
This commit is contained in:
parent
8df686ed2e
commit
3673f03841
@ -16,10 +16,6 @@
|
|||||||
|
|
||||||
unit ports;
|
unit ports;
|
||||||
|
|
||||||
{$ifdef VER3_0}
|
|
||||||
{$Calling StdCall}
|
|
||||||
{$endif VER3_0}
|
|
||||||
|
|
||||||
{$inline ON}
|
{$inline ON}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
{ to give easy port access like tp with port[] }
|
{ to give easy port access like tp with port[] }
|
||||||
|
|
||||||
{$ifdef VER3_0}
|
{$ifdef VER3_0}
|
||||||
procedure tport.writeport(p : word;data : byte);assembler;
|
procedure tport.writeport(p : word;data : byte);assembler;stdcall;
|
||||||
asm
|
asm
|
||||||
movw p,%dx
|
movw p,%dx
|
||||||
movb data,%al
|
movb data,%al
|
||||||
@ -27,14 +27,14 @@ asm
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function tport.readport(p : word) : byte;assembler;
|
function tport.readport(p : word) : byte;assembler;stdcall;
|
||||||
asm
|
asm
|
||||||
movw p,%dx
|
movw p,%dx
|
||||||
inb %dx,%al
|
inb %dx,%al
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tportw.writeport(p : word;data : word);assembler;
|
procedure tportw.writeport(p : word;data : word);assembler;stdcall;
|
||||||
asm
|
asm
|
||||||
movw p,%dx
|
movw p,%dx
|
||||||
movw data,%ax
|
movw data,%ax
|
||||||
@ -42,14 +42,14 @@ asm
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function tportw.readport(p : word) : word;assembler;
|
function tportw.readport(p : word) : word;assembler;stdcall;
|
||||||
asm
|
asm
|
||||||
movw p,%dx
|
movw p,%dx
|
||||||
inw %dx,%ax
|
inw %dx,%ax
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tportl.writeport(p : word;data : longint);assembler;
|
procedure tportl.writeport(p : word;data : longint);assembler;stdcall;
|
||||||
asm
|
asm
|
||||||
movw p,%dx
|
movw p,%dx
|
||||||
movl data,%eax
|
movl data,%eax
|
||||||
@ -57,7 +57,7 @@ asm
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function tportl.readport(p : word) : longint;assembler;
|
function tportl.readport(p : word) : longint;assembler;stdcall;
|
||||||
asm
|
asm
|
||||||
movw p,%dx
|
movw p,%dx
|
||||||
inl %dx,%eax
|
inl %dx,%eax
|
||||||
|
@ -17,20 +17,20 @@
|
|||||||
type
|
type
|
||||||
{$ifdef VER3_0}
|
{$ifdef VER3_0}
|
||||||
tport = object
|
tport = object
|
||||||
procedure writeport(p : word;data : byte);
|
procedure writeport(p : word;data : byte);stdcall;
|
||||||
function readport(p : word) : byte;
|
function readport(p : word) : byte;stdcall;
|
||||||
property pp[w : word] : byte read readport write writeport;default;
|
property pp[w : word] : byte read readport write writeport;default;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
tportw = object
|
tportw = object
|
||||||
procedure writeport(p : word;data : word);
|
procedure writeport(p : word;data : word);stdcall;
|
||||||
function readport(p : word) : word;
|
function readport(p : word) : word;stdcall;
|
||||||
property pp[w : word] : word read readport write writeport;default;
|
property pp[w : word] : word read readport write writeport;default;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
tportl = object
|
tportl = object
|
||||||
procedure writeport(p : word;data : longint);
|
procedure writeport(p : word;data : longint);stdcall;
|
||||||
function readport(p : word) : longint;
|
function readport(p : word) : longint;stdcall;
|
||||||
property pp[w : word] : longint read readport write writeport;default;
|
property pp[w : word] : longint read readport write writeport;default;
|
||||||
end;
|
end;
|
||||||
{$else VER3_0}
|
{$else VER3_0}
|
||||||
|
Loading…
Reference in New Issue
Block a user