Download Print this page

Commodore VIC 20 User Manual page 11

Programmer’s aid cartridge
Hide thumbs Also See for VIC 20:

Advertisement

After the command KEY is entered and the
twelve function key commands are displayed,
the function keys can be redefined by typing the
letters CLR followed by (RETURN) (to enter the
function key change mode), moving the cursor
to the key you wish to change, overwriting the
existing command and pressing (RETURN).
PROGRAMMER'S AID will automatically enter
the last set of quotation marks following the last
character of your entry. Thereafter, each time
that key is pressed, the new command will
automatically be displayed on the screen.
NOTE: If your new entry is shorter than that
which was previously assigned to the function
KEY, press the SPACE BAR to delete the surplus
characters and press RETURN.
To change another key, clear the screen, use
the KEY command again and repeat the above
procedure.
Alternatively you can simply type the word
KEY, the number of the key you wish to change, a
comma and the new command in quotation
marks. Press RETURN to enter the change.
IF, after redefining a KEY command, the
message "ILLEGAL QUANTITY ERROR" is
displayed, you have exceeded the 10 / character
maximum command length. If you cannot reduce
the size of the command by abbreviation, assign
part of the command to another function key.
The reverse-field left arrow after some KEY
commands indicates a carriage return which is
executed automatically after the command is
entered.
WARNING: The new assignments of the function
keys will not be retained if you change to the
alternative mode. If you assign commands to the
function keys in PROGRAM mode and then
change to EDIT mode, when you return to
PROGRAM mode, the function keys will retain
their initial values.
EXAMPLE :
To assign the BASIC code PRINT
to the F1 function key:
COMMAND :
KEY 1,"PRINT" (RETURN)
RESULT :
You can now display the BASIC
code PRINT on the VIC's screen
by simply pressing the function
key labeled F1.
2.4.9 ADDING CARRIAGE RETURNS
To eliminate the need to press RETURN after a
function key command, you may add a built in
RETURN to the command.
Use either method for changing KEY
assignments described above. Either add the
code
+ CHR$13
after the second set of quotation marks and
then press RETURN or carry out the following
instructions prior to the second set of quotation
marks:
(a)
Hold down the CTRL key and press the RVS
ON key. (This turns on the reverse mode.)
(b)
Type the left-arrow key (on the top left of the
VIC keyboard).
(c)
Type the end quote marks (") and press
RETURN.
When you press this function key, you will
automatically generate a RETURN after the
command.
2.4.10 HELP
FORMAT :
HELP
PURPOSE : To display the line on which an error
occurred during program execution
and highlight the position of the error
in reverse field characters.
HELP will only work if the command is given
immediately after an error has been detected by
the BASIC interpreter and whilst the error
message is displayed on the screen. If the STOP
key is pressed whilst a program is running, HELP
will only indicate the last program line which was
executed prior to the STOP command.
NOTE: Because of the way in which the BASIC
interpreter works, the exact error may not always
be displayed. It will, however, be very close to
the reverse field area.
EXAMPLE :
To find the error in the following
program:
10 / FOR CO = 1 TO 10 /
20 / PRINT CO + 2 * 3.142
30 / NEXT C
TYPE :
RUN (RETURN)
DISPLAY :
7.284
?NEXT WITHOUT FOR ERROR
IN LINE 30 /
READY
COMMAND :
HELP (RETURN)
DISPLAY :
30 / NEXT C (the letter "C"
appears in reverse field display).
2.4.11 DUMP
FORMAT :
DUMP
PURPOSE : To display the values of all variables
except those in arrays.
The variables will be listed in the order in
which they were defined in the program and will
be displayed in the format:
variable name = value
7

Advertisement

loading
Need help?

Need help?

Do you have a question about the VIC 20 and is the answer not in the manual?

This manual is also suitable for:

Vic 1212