CT_INBYTE

 INBYTE()
 Reads an 8 byte from a port
------------------------------------------------------------------------------
 Syntax

     INBYTE(<nPort|cHexPort>) --> nByte

 Argument

     <nPort|cHexPort>  Designates a port address from which a byte is
     read.  This value can be a decimal integer or hexadecimal string.

 Returns

     INBYTE() returns the byte read from the specified port; or a value of -
     1, if a parameter error occurs.

 Description

     Clipper Tools always attempts to offer finished solutions at the
     highest-possible level for such standared hardware as a serial interface
     port.  However, if you read a highly specialized systems and their ports
     from Clipper, use INBYTE() or INWORD().

 Note

     .  A random return value is produced for a nonexistent port or
        one that cannot be read.

 Examples

     These examples read the first port address of the first serial interface
     port.  This is only an example, since the Clipper Tools contains
     special port functions.

     .  With a decimal parameter:

        ? INBYTE(1016)       // 1st Port (COM1)

     .  With a hexadecimal parameter:

        ? INBYTE("3F8")      // Also 1st Port (COM1)

See Also: INWORD() OUTBYTE()

 

Tools – PEEK/POKE Functions

Introduction PEEK/POKE Functions
INBYTE()   Reads an 8 byte from a port
INWORD()   Reads in a 16-bit word from a port
OUTBYTE()  Sends a byte to a port
OUTWORD()  Sends a 16-bit word to a port
PEEKBYTE() Reads a byte from memory
PEEKSTR()  Reads a byte sequence from memory
PEEKWORD() Reads a 16-bit word from memory
POKEBYTE() Writes a byte to memory
POKEWORD() Writes a 16-bit word to memory