EasyManua.ls Logo

Radio Shack TRS-80 - Summary of LEVEL 1 BASIC; Commands; Statements

Radio Shack TRS-80
236 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Summary
of
LEVEL 1
BASIC
Commands
Purpose
NEW
Clears out all
program
lines stored
in
memory
RUN
Starts
program
execution
at
lowest-numbered
line
RUN# #
#
Starts
program
execution
at
specified
line
number
LIST
Displays
the first
12
pro-
gram
lines stored
in
memory, starting
at low-
est
numbered
line.
Use
key
to
display
higher-
numbered
lines (if any)
Example
Described
in
Chapter(s)
NEW
(not
part
of
program)
RUN (not
part
of program)
RUN
300
(not
part of
program)
LIST (not part
of program)
1
11
LIST###
Same
as
LIST, but
starts LIST
300
(not
part of
11
at
specified
line
number program)
CONT
Continues
program
execu-
tion
when
BREAK
AT
CONT (not
part
of program) 11
###
is
displayed
Described
in
Statements
Purpose
Example
Chapters)
PRINT
Prints
value
of
a 10
PRINT "A+B="; 1,2,3
variable or
expression;
A+B
also
prints
whatever
is
inside
quotes
INPUT
Tells
Computer
to let
you
enter data
from
the Keyboard
1(?
INPUT
A,B,C
7
INPUT
Also has
built-in
PRINT
capability
10
INPUT "ENTER
A"; A
7
READ
Reads data
in
DATA
statement
10READA,B,CA$
16
DATA
Holds data
to
be read
by
READ
statement
20
DATA
1,2,3,
"SALLY"
16
RESTORE
Causes
next READ
statement
to start
with
first
item in first
DATA
line
30
RESTORE
16
LET
GOTO
232
(Optional)
Assigns a
new
value
LET A=3.14159
to
variable on
left of
equals sign
Transfers
program
control
10 GOTO
300
to
designated program
line
Statements
Purpose
Described
in
Example
Chapters)
IF-THEN
Establishes a
test point
10IFA=B
THEN
300
6
FOR-NEXT
Sets up
a
do-loop
to be
executed a
specified
number of times
10
FOR
1=1
TO
10
10,11
20
NEXT I
13
STEP
Specifies
size of
increment
10
FOR
1=0
TO
10
STEP 2
10
to
be used in
FOR-NEXT
loops
STOP
Stops
program
execution
and prints
BREAK AT
###
message
END
Ends
program
execution
and
sets program
counter
to
zero
GOSUB
Transfers
program control
to
subroutine
beginning at
specified
line
RETURN
Ends
subroutine
execution
and
returns
control to
GOSUB
line
ON
Multi-way
branch used
with GOTO
and
GOSUB.
10
IF
A(B
STOP
1
1
99 END
10 GOSUB
3000
15,25
3010
RETURN
15,25
10
ON N
GOTO
30,40,50
15
10
ON N GOSUB
3000,
4000, 5000
Print
Modifiers
Purpose
AT
(Follows
PRINT)
Begins
printing
at
specified
location
on
Display
Described
in
Example
Chapters)
10
PRINT
AT
650,
"HELLO" 22
TAB
(Follows
PRINT)
Begins
printing
at
specified
number
of spaces
from
10
PRINT
TAB
(10);
"MONTH"; TAB
(20);
"RECEIPTS"
12
left
margin
Graphic
Described in
Statements
Purpose
Example
Chapter(s)
SET
Lights
up
a
specified
location
on
Display
10
SET
(30,40)
20,22
RESET
Turns
off
a
specified
graphics
location on
Display
20
RESET
(30,40)
20,22
POINT
Checks
the specified
graphics
location:
if
point is
"on",
returns
a
1;
if
"off,
returns
a0.
30
IF POINT
(30,40)=
1
THEN
PRINT "ON"
22
CLS
Turns
off all
graphics
locations
(clears
screen)
10
CLS
10,20

Other manuals for Radio Shack TRS-80

Related product manuals