INPORT

Purpose:

Retrieve 1, 2, or 4 bytes from a port.

Syntax:

INPORT(port, datatype)

port

-

An integer, the output port

datatype

-

Optional. An integer. The type of data to input. Defaults to SBYTE, signed byte.

Returns:

An integer, the value read from the port.

Example:

inport(0x11, sbyte)

 

inputs a single byte from port 17 (0x11).

 

inport(0x11, sint)

 

inputs two bytes from port 17 (0x11).

 

inport(0x11, long)

 

inputs four bytes from port 17 (0x11).

Remarks:

The datatype parameter may be SBYTE, UBYTE, SINT, UINT, ULONG, LONG, FLOAT or DOUBLE.

See Also:

CASTBYTE

DOUBLE

FLOAT

LONG

OUTPORT

SBYTE

SINT

UBYTE

UINT

ULONG