EasyManuals Logo

Atari 400 Basic Reference Manual

Atari 400
122 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 #30 background imageLoading...
Page #30 background image
TRAP
(T.)
22
Program
Stateme
nt
s
and
B,
because
of
the
RESTORE
statement,
will
still
equal
30.
Therefore,
the
PRINT
statement
in
line
50
will
display
SUM
TOTAL
EQUALS
45.
Format:
Example:
TRAP
aexp
100 TRAP 120
The
TRAP
statement
is
used
to
direct
the
program
to
a
specified
line
number
if
an
error
is
detected
.
Without
a TRAP
statement,
the
program
stops
executing
when
an
error
is
encountered
and
displays
an
error
message
on
the
screen.
The
TRAP
statement
works
on
any
error
that
may
occur
after
it
has
been
ex-
ecuted,
but
once
an
error
has
been
detected
and
trapped,
it
is
necessary
to
reset
the
trap
with
another
TRAP
command.
This
TRAP
command
may
be
placed
at
the
beginning
of
the
section
of
code
that
handles
input
from
the
keyboard
so
that
the
TRAP
is
reset
after
each
error.
PEEK(195)
will
give
you
an
error
message
(see
Appendix
B).
256
*PEEK(187)+ PEEK(186)
will
give
you
the
number
of
the
line
where
the
error
occurred.
The
TRAP
may
be
cleared
by
executing
a
TRAP
statement
with
an
aexp
whose
value
is
from
32767
to
65535 (e.g., 40000).

Table of Contents

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