Tandy 1000 Basic Reference Manual page 317

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

Chapter
10
I
BASIC
Keywords
STICK
Function
STICK (action)
Returns the coordinates of the joysticks.
Action may be one of the following:
0
1
2
3
reads all
4
coordinates, and returns the horizontal (x)
coordinate for Joystick A.
returns the vertical (y) coordinate for Joystick
A.
returns the horizontal
(x)
coordinate for Joystick
B.
returns the vertical (y) coordinate for Joystick
B.
The coordinates returned by STICK(l), STICK(2), and STICK(3)
are those previously read by STICK(0).
Joystick A is the left joystick and Joystick B
is the
right joystick.
Sample Program
The following program continually displays the coordinates of
joystick
B.
1 0 CLS
2 0 LOCATE 1 ,I
2 5 T = S T I C K < 0 )
3 0 P R
I
N T " B :
" ; S T I C K ( 2 )
4
0
P R
I
N T " B :
"
;
ST
I
C
K
(
3 1
5 0 GOT0 2 0
315

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents