The IN and OUT functions are potentially dangerous. Do not play with these functions! You may damage your hardware.

Note: These functions use a privileged instruction(in) and will fail with an exception under windows NT, 2000 and XP.

INP statement

Purpose: INP is a device I/O function that returns a BYTE read from an I/O port. Port% is integer value between 0 and 65,535.


 Syntax:

 RetVal% = INP(Port%)

 Parameters:

  • RetVal% Returns a BYTE read from In/Out Port%.
  • Port% Integer value of port between 0 and 65,535.

INPW statement

Purpose: INPW is a device I/O function that returns the WORD read from an I/O port. Port% is integer value between 0 and 65,535.


 Syntax:

 RetVal% = INPW(Port%)

 Parameters:

  • RetVal% Returns a WORD read from In/Out Port%.
  • Port% Integer value of port between 0 and 65,535.

OUTP statement

Purpose: OUTP is a device I/O statement that sends a BYTE to a machine I/O port. Port% is integer value between 0 and 65,535.


 Syntax:

 OUTP(Port%, Byte%)

 Parameters:

  • Port% Integer value of port between 0 and 65,535.
  • Byte% Byte to send to Port%.

OUTPW statement

Purpose: OUTPW is a device I/O statement that sends a WORD to a machine I/O port. Port% is integer value between 0 and 65,535.


 Syntax:

 OUTPW(Port%, Word%)

 Parameters:

  • Port% Integer value of port between 0 and 65,535.
  • Word% Word to send to Port%.