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 #209 background imageLoading...
Page #209 background image
Advanced
Techniques 197
before
that
most
recently
added.
Try
this
example
program.
10
GOSUB
100
20
PRINT "MAIN
PROGRAM"
30
END
100
GOSUB
200
110
PRINT "SUBROUTINE
100"
120
RETURN
200
GOSUB
300
210
PRINT "SUBROUTINE
200"
220
RETURN
300
RETURN
If
you
run
this
program,
the
XL
will
follow
the
GOSUBs
to
line
300
and
then
RErrURN
progressively
through
each
subroutine,
printing
the
message.
If
you
now
change
line
300
to
read:
300
POP:POP:RETURN
and
run
the
program
again,
the
program
will
only
print
(MAIN PROGRAM'
and
stop.
ERROR
HANDLING
The
XL
has
a
command
which
allows
you
to
take
corrective
action
should
an
error
occur
as
a
program
is
running
-
TRAP.
The
syntax
is:
TRAP N
where
N
is
the
line
number
to
which
the
program
is
directed
when
an
error
is
encountered.
TRAP
must
be
executed
before
the
error
occurs, so you
should
put
it
at
the
start
of
any
program
in
which
you
wish
to
use
it.

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