EasyManua.ls Logo

Radio Shack TRS-80 - Page 109

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...
Careful
now, don't
mess
up
the screen.
Type
50
RESET
(55,32)
and
RUN.
How
about that. You found the ON-OFF
switch!
Want
to
really press
your
luck?
Try
turning
the light back on. That's right, type
50
SET
(55, 32)
and
RUN
5 times in a row.
Then
50 RESET (
55,
32)
and
RUN.
Oh
well, can't win 'em all. Why didn't
it
work? It has to work. It did work! Then why
didn't
the fool light go OFF? Answer: The
carriage
return keeps moving it
up
away from its origi-
nal address, and only what's at a specific address gets turned
ON
and
OFF. The screen
addresses never move.
The
point of
all this obviously is that we can
control
whether each block
on
the screen is
white or dark (on
or off)
by
"talking" to it at its individual address with SET and RESET
statements.
Blinking Lights in
the
Sky
-
Flying Saucers or Lightning Bugs?
If one has
an ON-OFF switch, what does
one
do
with it? Is that what's called a rhetorical
question?
With a little imagination one
could
create
blocks
that
don't
just go
ON
and OFF,
but do so to
attract
attention . . . by
blinking.
This simple
program
illustrates how
to
set up
a "blinker".
10
CLS
20
X
=
60
30 Y
=
25
40
SET(X.Y)
50
RESET(X.Y)
60
GOTO 40
Back For More
. .
.
In the
horizontal
direction,
there are 128 light-block addresses, numbered from to 127.
is
at
the
far
left, 64 is near the middle and 127 is at the far right.
107

Other manuals for Radio Shack TRS-80

Related product manuals