Then - Radio Shack TRS-80 User Manual

Micro computer system
Hide thumbs Also See for TRS-80:
Table of Contents

Advertisement

120 IF
YO-1
THEN
80
130
Y
=Y-2*D
140
D=-D
150
GOTO
90
999
60TD
999
Since
we
did
not
explain
in detail
how
that
fairly
simple
program worked,
take
time
now
to
see
if
you
can follow
it
through.
When
you
have
it
figured out, tackle
this
exercise:
EXERCISE
22-1
:
Using
PRINT
AT
statement(s), cause the
word "PING"
to
appear
near the
ball
each time
it
bounces
off either
the
top
or
bottom
boundary.
Isn't
it
amazing
how
close
we
are
to getting to
some
of the actual video
games
that are
all
the rage?
and
yet
it's
really
so
simple
and
logical.
Merely
for Display
Purposes
A
good
way
to
get
a
feel
for
PRINT
AT
(or
any
feature)
is
to
look
at
a
fairly
simple
program
which
illustrates
its
use.
This
program
lays
out
a
graph
format on
the screen.
What you
do
with
it
beyond
that point
depends on your
own
needs and
interests,
but
it is
worth
entering,
studying
and
getting
a
feel
for
its
use.
Type:
10
CLS
20 K
=
900
30
F .X =
1T059
40
P.ATK+X,
"
.
"
;
50
N.Xi
K
=
964
60 FOR
Y =
TO
13
70
P.ATY*64
+
5
,
"
.
"
;
80
NEXT
Y
136
One
noteworthy
procedure
in this
program
is
the
use of
trailing
semicolons
after
PRINT
AT
state-
ments.
The
reason^again,
is
that
theprinting
is
taking piaee
in
the
last line
on
the screen
so the
carriage
return vrbald
activate
£
scroll.
We
there-
.
fore
have
to suppress the
carriage
return
with the
•.semicolon.
.
.,-,•.'•••,
'"
'
"-"

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents