EasyManua.ls Logo

Radio Shack TRS-80 Model III - Page 141

Radio Shack TRS-80 Model III
274 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...
TROFF
Turns off the Trace
function. See TRON.
TRON
Turns
on a Trace function
that lets you follow program-flow
for
debugging and
execution analysis.
Each time the program advances
to a new program
line,
that
line
number will be displayed
inside a pair of brackets
.
For example,
enter the following program:
10 PRINT
"LINE
10"
20 INPUT
"PRESS
<ENTER> TO
BEGIN
THE
LOOP";
X
30 PRINT
"HERE
WE
GO..."
40 GOTO 30
Now
type in TRON (ENTER)
,
and
RUN (ENTER) .
<10>LINE
10
<20>PRESS <ENTER> TO BEGIN
THE LOOP?
<30>HERE WE GO.
.
.
<40><30>HERE WE GO.
.
.
<40><30>HERE WE GO...
etc.
(Press
(SHIFT) and
@
simultaneously to
pause execution and freeze
display.
Press
any key
to continue with execution.
)
As you can see from the
display, the program is in
an infinite loop.
The numbers show you
exactly what is going
on. (To stop execution,
press
(BREAK)
.)
To turn
off the Trace function
,
enter TROFF
.
TRON
and TROFF may
be used inside
programs to help you
tell when a given
line is executed
.
For Example
50
TRON
60
A
=
A
+
1
70 TROFF
might be helpful
in pointing out every
time line 60 is
executed (assuming
execution
doesn't jump
directly to
60 and bypass
50).
Each time
these three lines
are
executed,
<60>
<70>
will
be displayed. Without
TRON, you wouldn't
know
whether the program
was actually executing
line 60. After a program
is debugged,
TRON and TROFF
lines can be removed.
131

Other manuals for Radio Shack TRS-80 Model III

Related product manuals