Go
ahead
—
take the Pen by the horns! Specify
several
points
on
X-Pad and draw
several
lines. Now try drawing
lines
using varying
lengths
(8",
10",
5",
etc.).
Be
sure to
experiment with
horizontal, vertical, and diagonal
lines.
You might also try
changing PMODEs (for lower
resolution
and thicker
lines) and SCREEN
(for different
Color
Sets).
What happens is this:
•
Line
40 goes to 140
and gets
the data.
•
Line
50 waits
for
Pen down.
•
Line
60 gets the first
point.
•
Line
70 waits
for Pen
up.
•
Line
80 saves the first
point.
•
Line
90 gets the
data.
•
Line
100
draws
the
line.
•
Line
110 draws
the line.
•
Line
120
waits
for Pen
up.
•
Line
130
goes back for
more
data.
To draw a
triangle,
box,
or
rectangle,
specify
a startpoint
and endpoint for the first
side of the
figure.
Then use that
endpoint
as the next startpoint.
Repeat this procedure
for
all the
sides of
the
figure.
Notes
Chapter
2 Checkpoint
1. (True/False)
PEEK
addresses X-Pad's
memory
locations.
2.
Before
you
enter
a program:
a.
be sure X-Pad
is
properly
connected.
b.
insert
a sheet
of paper on
the
Writing
Surface.
c.
be
sure the Color Computer is powered-up.
d. all
of the above.
e.
none
of
the
above.
3.
A
line
has:
a. two
endpoints.
b. a startpoint and an endpoint.
c.
a linear row
of points.
d. all of the
above.
e.
none of
the above.