EasyManuals Logo

Atari 800 User Manual

Atari 800
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 800

Questions and Answers:

Question and Answer IconNeed help?

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

Atari 800 Specifications

General IconGeneral
ProcessorMOS Technology 6502
Processor Speed1.79 MHz
ROM10 KB
GraphicsANTIC and GTIA chips
Release Year1979
Display Resolutionup to 320 x 192
Colors128 colors
Sound4 channels
StorageCartridge, cassette, floppy disk
PortsCartridge, serial, monitor
Operating SystemAtari OS

Related product manuals