EasyManuals Logo

Atari 400 User Manual

Atari 400
326 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
Page #123 background imageLoading...
Page #123 background image
Atari BASIC
Reference
Guide
121
The
previous
exa
mple
cons
ists
of
a
program
that
uses
the
GET
statement
with
the
keyboard
. Line
10
opens channel
;;2
for
the
keyboard
input.
In line
20
, the
GET
statement assigns the ASCII
code
of
a character
to
the variable
X.
Line
30
displays the ASCII
code on
the
sc
reen.
When
the
program
is
executed,
line
10
opens
the
I/ O c
hannel
,
but
the
pro
gram waits
at
line
20.
When
the next keystroke occurs, the
program
continues
. In this
example, the keystroke
is
the S key.
Th
e ASCII
code
of
Sis
83,
so
X
is
assigned
the
value
83.
Line
30
causes
83
to
be
printed
on
the
display, and
line
40
closes the I/ O channel.
The
GET
statement can al
so
be used
with
the display.
An
OPEN
s
tatement
mu
st
precede
the
GET
state
ment.
The OPEN
statement specifies
an
I/ O channel that is
not
currently
open.
The
channel
number
must be
from
1
to
7.
Th
e second a
rgument
mu
st be 4
(input)
or
12
(inp
ut and
output)
, and
the
device
must
be
"5".
With
the display, the
position
of
the
cursor
determines
the character
or
picture
e
lement
to
whi
ch
the
GET
statement
applies. The
GET
statement retrieves
the
COLOR
information
at
that
point.
In graphics modes 0, 1, and 2,
the
COLOR
information
indicates
a character (and
color
register). Tables 9-4 and 9-7 list
the
COLOR
values
for
graphics modes 0, 1, and
2.
In graphics modes
3
through
8,
the
GET
statement indicates the
color
of
the
picture
element
where
the
cursor
is
located. The value
that
a
GET
statement retrieves
is
assigned
to
the
variable in
the
GET
statement. The cursor advances
to
the
ne
xt
position
after
a
GET
statement
has
been
executed
. An
attempt
to
execute
a
GET
statement
when
the
cursor
is
at the last
column
of
the
last
row
results in an
error.
EXAMPLE
10
OPEN
#3,4,0,
"5"
20
GRAPHICS 2
30
COLOR
65
40
PLOT 0,0
50
POSITION 0,0
60
GET
#
3,
X
70
PRINT X
80
CLOSE
#3

Other manuals for Atari 400

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atari 400 and is the answer not in the manual?

Atari 400 Specifications

General IconGeneral
ManufacturerAtari
Model400
TypeHome Computer
Release Year1979
CPUMOS Technology 6502
CPU Speed1.79 MHz
ROM10 KB
Operating SystemAtari OS
KeyboardMembrane keyboard
RAM8 KB (expandable to 48 KB)
GraphicsANTIC and GTIA chips
Sound4 channels
DisplayRF output for connection to TV
StorageOptional cassette tape drive or floppy disk drive
PortsCartridge
Display Resolution320x192 (16 colors)

Related product manuals