EasyManua.ls Logo

Radio Shack TRS-80

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...
Let
There
Be Light
Let's
light up
a spot on the
screen, then
interrogate
that point and see what
happens.
Type:
10
Y=1:N=0
20
IN. "DO
YQU WISH
TO
LIGHT THE
BLOCK
(Y/N)"jQ
30 CLS
40 IF Q
=
GOTO 80
50 SET(75,20)
60
GOTO 100
80
RESET(75,20)
100
IF POINT(75,20)
=
1 P.AT200,X(Y,
"
IS LIT"
200 IF
POINT(75,20>
=
P .
AT200
,
X
;
Y
,
"
I S
DARK
"
999
G.
999
And
RUN
several times.
Answer either
YES or NO, following
the
program action to
see
what
is
happening. Pretty
simple isn't
it? Really sort
of
a
status-reporting
system.
Think
what we
could do
if we set
something like this up
in
2
nested FOR-NEXT
loops so we
scanned the
entire screen and
got a status report
on
each point. Hmmm.
Almost
like a radar
scan of
the terrain. Hmmm
some
more.
2001
Here We Come
Snug up
your seat
belt, type
and RUN the
following
program, then
sit back
and watch
POINT in
action. Study
the display
very
carefully as it runs,
looking
for the many
things
that
occur. This 3%
minute
"moving picture"
really
tells all you need to
know about the
POINT
statement.
10
REM
*
DEMONSTRATION OF
GRAPHICS
'POINT
1
STATEMENT
*
20 P=15 : L=l
19
30 CLS
40
P.AT5 ."THIS IS
A
DEMONSTRATION
OF
THE
POINT STATEMENT
";
138
Y
and
N stand
Cor
Yes
and
No.
Your input
can
be
.
.
.«itteeir¥orY^,,N,.ar
:
No
i
:
"<^.^rj;^>:^^i>^:^£is^s$

Other manuals for Radio Shack TRS-80

Related product manuals