The features described in this topic are obsolete
and should not be used in new IDL code.

INP, INPW, OUTP, OUTPW

These routines are obsolete and should not be used in new IDL code.

Windows-Only Routines for Hardware Ports

You can address the hardware ports of your personal computer directly using the following routines. In each case, Port is specified using the hexadecimal address of the hardware port. For example, if serial port #1 of your PC is at address 3F8, you would use the following IDL commands to read that port:

paddr = '3F8'x	Set paddr to hexadecimal value. 
data = INPW(paddr)	Read data. 

Result = INP(Port, [D1 . . . DN])

This function returns either one byte (if only the port number is specified) or an array (the dimensions of which are specified by D1 . . . DN) read from the specified hardware port. Port is the hardware port number. For example,

result = INP(paddr) 

would read a single byte, and

result = INP(paddr, 2,4) 

would read a two-element by four-element array.

Result = INPW(Port, [D1 . . . DN])

This function returns either one 16-bit word, as an integer (if only the port number is specified), or an array (the dimensions of which are specified by D1 . . . DN) from the specified hardware port. Port is the hardware port number.

OUTP, Port, Value

This procedure writes either one byte or an array of bytes to the specified hardware port. Port is the hardware port number. Value is the byte value or array to be written.

OUTPW, Port, Value

This procedure writes either one 16-bit word or an array of words to the specified hardware port. Port is the hardware port number. Value is the integer value or array to be written.