Sharp mz-800 Owner's Manual page 55

Hide thumbs Also See for mz-800:
Table of Contents

Advertisement

(5) Joystick functions
STICK(f)
f: numeric value
Returns an integer from 1 to 8 which indicates the state of the joystick lever or the cursor control keys
on the keyboard. The numeric value f specifies the device from which the data is read, as shown below.
0: Cursor contorl keys of the keyboard
1: Joystick 1
2: Joystick 2
The relationship between the integer and the direction in which the joystick lever is pushed (or the
cursor control keys are pressed) is as follows:
Cursor control key
When the keyboard is selected by specifying 0 as f, integers 2, 4, 6, and 8 are returned when two cursor
control keys are pressed at the same time, as shown below.
2:
[1] and [6]
4:
[2] and 11)
6: [1] and [<]
8: [+] and
eal
STRIG(f)
f: numeric value
Returns an integer 0 or 1 which indicates the state of the joystick button or the space bar on the key-
board. When the space bar on the keyboard or the joystick button is pressed, 1 is returned and when
they are not pressed, 0 is returned. The integer value f specifies the device as follows:
0: Keyboard space bar
1; Joystick 1 button
2: Joystick 2 button
The following program uses STICK and STRIG functions. It draws a vertical, horizontal or inclinded
line when a cursor key is pressed, and clears the screen when the space bar is pressed.

Advertisement

Table of Contents
loading

Table of Contents