ccINS

Syntax

ccINSb(Port:Word,Destination:Pointer,Counter:Uint,OPT Direction = 1:Schar)
ccINSw(Port:Word,Destination:Pointer,Counter:Uint,OPT Direction = 1:Schar)
ccINSd(Port:Word,Destination:Pointer,Counter:Uint,OPT Direction = 1:Schar)

Description

Read from the 'Port' 'Counter'x daten to memory 'Destination'

Parameters

Port - Address of a port
Destination - Memory location pointer (must be allocated!)
Counter - Amount of bytes,words or dwords to be read
Direction -
1 = 'Destination' will be incremented.
-1 = 'Destination' will be decremented.

Return value

None

Remarks

You have to get permission by calling ccAllowIO() for the port(s) or ccSetIOPLto3() to avoid GP error!
Think on get 1,2 or 4 I/O address permited for Byte,Word or Dword access accordingly!

Example usage

ccAllowIO("0x61")
DEF Dest AS Pointer
Dest = New(char,20)
ccINSb(0x61,Dest,20)
FOR A = 0 TO 19
PRINT USING("0##",A)+"=",*(Dest+A)+0
NEXT A
DELETE Dest

See
OI_Demo.eba
ccAllowIO()
ccSetIOPLto3()
ccOutS()