EasyManua.ls Logo

Radio Shack TRS-80 - Page 55

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...
Chapter
11
Son of FOR-NEXT
This is
heady
stuff.
If
you turned off the
Computer
between Chapters, load the program
which
you
taped
from Chapter
10
into the
Computer.
Modify
the program
so the rate and
time
are
calculated and
printed for
every
50
mph
incre-
ment
instead of
the
100
mph increment
presently in
the program,
RUN.
Answer: 80 FOR R
=
200 TO 1000
STEP 50
Trouble
in
the Old Corral
What a revolting development! The printout goes so fast we can't read it, and by the time it
stops, the top part is cut off. Aught 'a known you can't
trust
these computers.'
Solutions For Sale
Several solutions are
available:
1. Pressing
nearly
any key will stop
program execution. Try
RLJNning
a
number
of times,
pressing different
keys (and the space bar) during the run, to see what happens.
RUN again, this
time using only the
+
(up-arrow), to freeze the display. Nifty
huh?
Clean stop
clean restart. This is the key to use for temporary freezes.
2.
If you
want
a
classy display
you
can build
a
"pause" into the program. The screen
will
fill,
halt
a moment, and automatically go on if you don't interrupt the program.
The Timing
Loop
In
order to learn
about the
timer
loop,
let's
employ another sly trick. We're going to leave
our "Flight time" program in
the
Computer, and put in a second
program.
As-.
you
can
see, pressing
a
ksy not only
stops
execu-
tion but inserts its own letter
of
number. Messy!
i-
"ii"
There's- ffppthe*
one:
y
ou
em
try
but it'&not.a
vswry
useful
oae
;
press
[break;
key. That's even
jjiessier
than
the fitst
one. (To restart
after
a
[break]
,
either enter
RUN
to start
program
ail
over again or
C
ON
T -to continue
execution
*t
..
;-.
ther
"break-point
,f
)
53

Other manuals for Radio Shack TRS-80

Related product manuals