function/JOY                                                     function/JOY
 
 NAME
     JOY -- Polls joystick port
 
 ABBREVIATION
     j <shift> O

 SYNOPSIS
     JOY(<port>)

 FUNCTION
     This function returns the state of joystick connected to port <port>. 
     Any value returned of 128 or more means the fire button is also 
     depressed. The direction is indicated as follows:
 
                     UP       FIRE
 
                     1        128
 
                  8     2
 
         LEFT   7    0    3   RIGHT
 
                  6     4
 
                     5
 
                    DOWN
 
 INPUTS
     <port> - joystick port number (1-2)
 
 RESULT
     State of joystick (numeric).

 EXAMPLES
     100 J=JOY(2)
         If value of 135 returned, joystick in port 2 has turned to left with
         fire button.
 
 NOTES
     None
 
 BUGS
     None
 
 SEE ALSO
     None