Chapter
22
Advanced Graphics
Remember the bouncing dot? Wouldn't it be nifty if
we
could
get the screen
to say "PING"
each
time
the dot bounced off the
barrier?
Well / think it would
be
nifty, so we're going
to
do it. But first . . .
We learned
all
about SET
and
RESET earlier. Now
we
will
learn
about
PRINT
AT—
a
special type of PRINT
statement
especially useful in
graphics,
and
POINT(X.Y)
—
a quite unrelated
statement which allows us to
look
at any of the
6144 graphic block locations
and
get an answer to the question
"which
ones are ON
and which are OFF?" A
super powerful statement, and
it's
even
useful!
I
thought
you printed
ON,
not printed AT
Learn
something
new every
day. The PRINT AT (also written PRINT
AT and P.AT) state-
ment allows us
to begin
printing
starting at a location number. Example,
type:
10 CLS
50
PRINT
AT
200,
" HELLO THERE
200, WHEREVER YOU ARE."
. . . and
RUN.
Where
is
200?
Back
to
the Radio Shack
graphics layout
chart (Video Display
Worksheet).
If you
don't
have
one
handy, there's
one back
in
Chapter
20.
With
the aid
of an
ordinary household electron microscope,
the words "PRINT
AT" are
clearly seen on the upper
left hand
corner
of
the sheet. Also,
an arrow pointing to a set
of
numbers. Further scrutiny
discloses a tiny "X", obviously referring
to
the
address
numbers
on the "X"
Street
—
and
a tiny "Y" pointing to the "Y" numbers
for
"Y"
Avenue. A truly
astute researcher
will also
see the "TAB" numbers
—
all 64
of them (starting
with
0).
The PRINT
AT numbers start at and
go
through 63
—
in the
first line.
They then
pick
up
on the second
line with #64 and continue through
#127.
The
third
line
starts with
#128,
etc.
The PRINT
AT
divisions
are really the same
as
those for
TAB except
PRINT
AT does not
start over again with
zero
on the second line. It keeps going right on through PRINT posi-
..yanloft oar
attempt
at humor
l'^£oMng
a
little
fun at ourselves here.
.!
133