CT_INWORD

 INWORD()
 Reads in a 16-bit word from a port
------------------------------------------------------------------------------
 Syntax

     INWORD(<nPort|cHexPort>) --> nWord

 Argument

     <nPort|cHexPort>  Designates a port address from which a word with a
     16-bit value is read.  This value can be a decimal integer or
     hexadecimal string.

 Returns

     INWORD() returns the word read from the designated port, or a value of -
     1 when an error occurs.

 Description

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

 Note

     .  A returns random value for a nonexistent port or one that
        cannot be read.

 Examples

     Show a read from a 16-bit port:

     .  With a decimal parameter:

        ? INWORD(512)           // Read from an additional device

     .  With a hexadecimal parameter:

        ? INWORD("200")         // The same port address

See Also: INBYTE() OUTWORD() NUMHIGH() NUMLOW()

 

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