EasyManuals Logo

Atari XL User Manual

Atari XL
262 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 #48 background imageLoading...
Page #48 background image
38
The
Atari
XL
Handbook
which
they
were
typed
in.
Again,
a R ...
loop is
used.
The
lines
from
210
to
280
sort
the
numbers
in
the
array
SORT(IO)
into
ascending
order.
A
FOR
...
NEXT
loop
compares
each
element
of
the
array
SORT
with
the
next,
and
swaps
them
over
if
they
are
in
the
wrong
order.
A
variable,
COUNT,
keeps
track
of
the
number
of
these
swaps
and,
if
at
the
end
of
the
loop
this
isn't
zero,
the
loop is
repeated.
Lines
310
to
330
complete
the
program
by
PRINTing
the
two
sets
of
numbers.
PAUSES
To
make
a
pause
during
the
running
of
a
program,
we
can
use
a
FOR
...
NEXT
loop
which
does
nothing
at
all
except
count
its
way
through
the
steps.
The
following
program
is
an
example:
10
FOR
T = 0
TO
5000
20
NEXT
T
30 PRINT
"ABOUT
10
SECONDS"
Another
way
to
make
a
pause
is
to
use
the
Atari's
built
in
timer:
The
three
storage
locations
18,
19
and
20
are
incremented
about
5
times
a second, so
for a 10
second
wait,
try:
10
POKE
19,0:POKE
20,0
20
IF
PEEK(19)
< 2
THEN
20
30
PRINT"
[BELL] "
(The
BELL
character
is
obtained
by
pressing
ESC
then
holding
down
CONTROL
and
pressing
2.)

Questions and Answers:

Question and Answer IconNeed help?

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

Atari XL Specifications

General IconGeneral
Release Year1983
CPUMOS Technology 6502C
GraphicsANTIC, GTIA
SoundPOKEY (4 channels)
StorageCassette tape
PortsCartridge
Operating SystemAtari BASIC
CPU Speed1.79 MHz
RAM64 KB

Related product manuals