Commodore VIC-20 Programmer's Reference Manual page 91

Hide thumbs Also See for VIC-20:
Table of Contents

Advertisement

cursor until it is on the line, then make the required changes,
inserting or deleting as needed. Once you are finished, just hit the
^^^^j key. All the changes will be stored as rrsc.e. If you jus;
want to geHhecursor past the line it is on, just hold My ;.li: ;Mwhile
hitting ^^^ij and [tie VIC will ignore :he I nes it passes
In order to delete a line from a program, just type the line number
and hit |;ir,i!!M;jfl . There is no command for deleting more than 1
line at a time, although there is a trick for erasing all but a few lines.
This involves LISTing the good portion of the program on the
screen, typing NEW, moving the cursor to the top line displayed,
and hitting |i;r,s:;i J on all the lines. This method only works if the
section to be kept is very small (less than one screenful).
a. Direct Mode -'Calculator" Mode
If you enter a command or set of commands without a line
number, they will execute as soon as you press the Ju.j:Uj;f.!l key.
This is called "Direct Mode" or "Immediate Mode."
Since the VIC allows muitiple statements on a line by using the
colon (:), you can actually get a short program to run without
entering line numbers. This is especially helpful when there is
already a program in memory that you don't want to disturb. The
maximum length of a program line is 4 screen lines, or 88
characters. In other words, if you enter a line numbered 10 you can
display four 22-character lines on the screen but the VIC will store
and interpret the information as one 88-character program line.
Here is a sample immediate mode program for a sound effect:
(don't hit |jJjj£|^U\| until you've typed the whole line)
POKE 36878,15:FOR L = 254 To 128 STEP-1:POKE 36876
LiPOKE 36876,0:NEXT:POKE 36878.0
Some people also call this "calculator mode," because one of the
most common things you can do with a VIC is perform calculations
that don't require a program.
Here are some examples of calculations:
PRINT 5 + 4
PRINT (2^4}*5/9
PRINT S!N(37)
Certain commands can't be used in direct mode. These are:
INPUT, INPUT#, GET, GET#, and DEF FN. The DATA statement
75

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents