ccINS

Syntax

ccINSb(Port:Word,Destination:Pointer,Counter:Uint)
ccINSw(Port:Word,Destination:Pointer,Counter:Uint)
ccINSd(Port:Word,Destination:Pointer,Counter:Uint)

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

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()