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 #96 background imageLoading...
Page #96 background image
94 User's
Handb
ook
to
the
Atari 400/800
Computers
Example
10 X = 3
20
IF
X
1\
2
AND
3 - X THEN END
30
PRINT "X
IS
EITHER
3 OR 0"
RUN
X
IS
EITHER
3 OR 0
This example
uses
AND
in
an
IF
/T
HEN
statement that ends the
program
if
X squared and 3 - X
both
are n
ot
equal to zero. Since X
is
assigned the value
3,
the first part
of
the
AND
statement equals
3 squared. This
is
a logical 1 because 3 squared
is
non-zero.
However,
the
second expression, 3 -
X,
is
equal to zero,
which
is
the
logical
O.
Since
EX1
=1
and
EX2
=0, the
AND
state
ment
is
false,
and the next statement
is
executed (line
30).
ASC
The
ASC
function
returns the ASCII code
for
the first character
of
a string. The
argument
of
ASC
ca
n be a string variable
or
constant.
ATN
CONFIGURATION
X = ASC(a$)
EXAMPLE
10
DIM
B$(10)
20
B$
= "ZEBRA"
30
PRINT
ASC(
B$)
RUN
90
The ATN
function
returns the arctange
nt
of
the a
rgum
ent. The
result
will
be
in
radians unl
ess
degrees are specified.

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