166 User's
Handbook
to
the Atari 400/ 800
Computers
The same
format
of
the
PUT
statement
is
used
with
the
Atari disk
drive. The
I/ O channel
for
the disk file must be
opened
for
an
appropriate
output
option.
Only
a
GET
statement can be used
to
recover
the
va
lu
es
that
were
recorded
with
a
PUT
statement.
When
the
display
is
used
as
an
output
device
(S:
or
E:
),
a
PUT
statement
is
used
to
place
one
character
or
illuminate
one
picture
element
on
the screen. The PUT statement causes the
output
to
appear
at
the
current
position
of
the cursor.
In
the
text modes, the value
of
the
PUT
statement corresponds
to
the
COLOR
value
of
each character (Tables 9-4 and 9-7).
As
a
result, a POSITION and PUT statement have the same result
as
a
COLOR
and PLOT statement.
EXAMPLE
10
GRAPHICS 2
20
POSITION
9,3
30
PUT
#6,65
The previous example contains a
program
that
uses
a
PUT
statement in graphics
mode
2.
Line
20
positions the cursor near
the
center
of
the
screen. The graphics modes always
use
I/O
channel
number
6.
As
a result, the PUT statement at Line
30
displays the character
"A"
at
the
current
cursor position. The
characters
that
correspond
to
the
PUT
statement values are listed
in
Tables 9-4 and 9-7.
When
a PUT statement sends the value
125
to
the
screen, the
display
is
cleared. Also,
when
the value
155
is
sent
to
the
screen,
the
cursor returns
to
the
beginning
of
the
next line.