INP

Format

number1 = INP (number2)

Description

This statement reads a byte from port number2 and stores the result in number1.

Example

A=INP(513)
A=ZBIT(4,A)
IF A=1 THEN TRIGGERPRESSED:
The above code will test the joystick port to see if the trigger is being pressed on joystick 1. You need a game card and joystick for this to work.

See Also

  • OUT