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 #210 background imageLoading...
Page #210 background image
198 The
Afar;
XL
Handbook
In
use,
if
an
error
is
encounterd,
the
normal
mechanism
whereby
program
execution
is
stopped
and
an
error
message
displayed
is
suspended.
Instead,
program
execution
continues
at
the
line
specified
by
the
TRAP
command.
At
this
line
number
you
must
include
code to
handle
any
possible
errors.
You
can
determine
what
type
of
error
has
occurred
with
the
statement:
ERR =
PEEK(195)
since
location
195
contains
the
code
number
of
the
error
(see
Appendix
2).
The
line
number
at
which
the
error
occurred
can
be
calculated
with
a
statement
like:
LINE =
PEEK(186)+256*PEEK(187)
The
following
program
uses
the
TRAP
command
to good
effect
by
using
it
to
display
full
error
messages
rather
than
error
codes
which
must
be
looked
up
in
a
table.
1
GOSUB
32000:TRAP
32500
32000
DIM
ERROR$(400):DIM
MESSAGE$(20)
32020
RESTORE
32100
32030
FOR ITEM =2 TO
21
32040
MESSAGE$="
":REM 20 SPACES
32050
READ
MESSAGE$
32060
ERROR$«ITEM-2)*20+1)=MESSAGE$
32070
NEXT
ITEM
32080
RESTORE
32090
RETURN
32100
DATA
MEMORY
INSUFFICIENT,
ILLEGAL VALUE,TOO
MANY
VARIABLES,STRING LENGTH,OUT OF
DATA

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