Basic
Loading and Running BASIC Programs
To load a BASIC program for execution or examination, type:
LOAD
"MY
F
I
LE"
CENTER)
where MYFILE
is
the program to be loaded into memory. Because
a path is not given, BASIC looks for MYFILE in the current
directory.
Add
,R
after the filename or pathname to cause the file to execute
automatically after loading. Using
RUN
instead of LOAD
also
causes
a file to execute automatically after loading.
Saving BASIC Programs to Disk
The syntax for saving a BASIC program is:
SAVE "MY
F
I
LE"
IENTER)
saves the program in memory
as
MYFILE. Because a path is not
specified, BASIC saves MYFILE in the current directory.
You can specify the drive and directory in which to save a file. For
example, to name a file
memos.bas
and save
it
in the WORK direc-
tory on Drive B, type:
SAVE
"B:
\WORK\memos.
bas"
(ENTER)
Typing and Editing BASIC Programs
When BASIC displays the
Ok
prompt, you can type in program lines
or commands. When you press the
(ENTEE
key, BASIC looks at the
first character of a line. If
it
is a digit, BASIC stores
it
in memory
as a program line.
If the first character is not a digit, BASIC tries to execute the line
as a command. For instance, type the following:
MI LES=390
(ENTER)
GALLON=15
CENTER)
PRINT MILES/GALLON
CENTER)
BASIC executes each command as
it
is
entered.
4
Tandy
1000