Commodore 128 System Manual page 284

Hide thumbs Also See for 128:
Table of Contents

Advertisement

This statement INPUTs the data from the file DATAFILE and
stores it in variables A$, C and D$.
KEY
Define or list function key assignments
KEY [key number, string]
There are eight function keys (F1-F8) available to the user on the
Commodore 128: four unshifted and four shifted. The
Commodore 128 allows you to perform a function or operation for
each time the specified function key is pressed. The definition
assigned to a key can consist of data, or a command or series of
commands. KEY with no parameters specified returns a listing
displaying all current KEY assignments. If data is assigned to a
function key, that data is displayed on the screen when that
function key is pressed. The maximum length for all the
definitions together is 246 characters.
EXAMPLE:
KEY 7, "GRAPHICO" + CHR$(13) + "LIST" + CHR$(13)
This tells the computer to select the (VIC), 40 column, text screen
and list the program whenever the F7 key is pressed (in direct
mode). CHR$(13) is the ASCII character for RETURN and
performs the same action as pressing the RETURN key. Use
CHR$(27) for ESCape. Use CHR$(34) to incorporate the double
quote character into a KEY string. The keys may be redefined in
a program. For example:
10 KEY 2,"PRINT DS$" + CHR$(13)
This tells the computer to check and display the disk drive error
channel variable (PRINT DS$) each time the F2 function key is
pressed.
To restore all function keys to their BASIC default values, reset
the Commodore 128 by pressing the RESET button.
LET
Assigns a value to a variable
[LET] variable = expression
17-42

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

128d

Table of Contents