Retrieve 1, 2, or 4 bytes from a port.
INPORT(port, datatype)
port |
- |
An integer, the output port |
datatype |
- |
Optional. An integer. The type of data to input. Defaults to SBYTE, signed byte. |
An integer, the value read from the port.
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).
The datatype parameter may be SBYTE, UBYTE, SINT, UINT, ULONG, LONG, FLOAT or DOUBLE.