BASIC PRffiRAMMING
SECTION 4.5
4.5.4
4. 5. 4. 1
FUNCTION KEYS
There are eight programmable function keys. They may be used as
a quick method of entering frequently used commands or
functions, or as eight separate interrupt keys.
Soft Keys
On entering the Basic interpreter, the bottom line of the LCD
displays the default values. These may be changed at any time
with the KEY function as described in Part 5, BASIC FUNCTIONS.
The screen only displays the first four characters, although the
string may be up to fifteen characters long.
The display of the soft keys is entirely optional, but they are
always active no matter whether they are displayed or not. This
feature
is controlled with the KEY ON and KEY OFF commands.
4.5.4.2
Interrupt Keys
VER. V09F_
The soft keys may be used to provide interrupts into Basic
programs. The relevant Basic statements are:
ON KEY (n) GOSUB line No.
KEY
(n) ON
KEY (n) OFF
KEY (n) STOP
The interrupts are tested at the beginning of every Basic
statement. Once a particular key has been pressed and has
interrupted, then it cannot interrupt again, although other keys
can still cause an immediate interrupt. However, one interrupt
on a particular key can be held pending while its interrupt
routine is executing. Function keys are recognised by having
BIT 7 set (BIT 7 of the ASCII code). When in INPUT these
interrupt keys are not serviced and, hence, the INPUT statement
receives these codes from the keyboard buffer and outputs the
relevant character to the screen.
PAGE 4 - 13