366
The
VIC
20
User
Guide
cassette tape. A program with no name
can
be read off cassette tape by its
location only.
The SAVE statement
is
most frequently used in immediate mode,
although it can be executed from within a program.
Example:
SAVE
Write the current program onto the cassette in drive
1,
leaving it unnamed
SRVE
"RED"
Write the current program onto the cassette in drive
1,
assigning the file name
of
RED
AS="RED"
Same
as
above
SAVE
AS
SAVE
"BLACKJACK
II
,2,
1 Write the current program onto the cassette in drive
2,
naming the program
BLACKJACK.
Write an
end-of-file mark after the program
DlskeHe
Drive
Format
SAVE "dr;file name",dev
The SAVE statement writes a copy
of
the current program from
memory to the diskette in the drive specified by
dr.
The program
is
given the
name
file name. dev must be present; normally, it has the value
8.
If
dev
is
absent, a default value of 1
is
assumed
and
the cassette
is
selected.
The file name assigned to the program must be new.
If
a file with the
same name already exists on the diskette, a syntax
error
is
reported. How-
ever, a program file can be replaced; if
an
@ sign precedes dr in the SAVE
statement text string, the program replaces the contents
of
a current file
namedfile name.
The diskette SAVE statement
is
also used primarily in immediate mode
although it can be executed out
of
a program.
STOP
The
STOP
statement causes the program to stop execution
and
return
control to VIC BASIC. A break message
is
displayed on the screen.
Format:
STOP