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 #185 background imageLoading...
Page #185 background image
Atari BASIC Reference
Guide
183
The
address
indicated
is
that
of
the
machine
language
subroutine
to
be
branched
to
. Function
arguments
between
0
and
65535
can
be
optionally
included
with
the
USR
command
as
indicated in
the
Configuration.
Beginning
with
the last
argument,
each
argument
is
evaluated
and
converted
to
a 2-byte hexadecimal
integer.
This
integer
is
placed
on
the hardware stack, and a
count
of
the
USR
arguments
is
also pushed
on
the stack. The hardware stack
configuration
is
depicted
in Illustration 5-2.
Returning To
BASIC
When
BASIC executes a
USR
function,
the BASIC
program's
current
location
is
pushed
onto
the
hardware
stack (see
Illustration 5-2). The
machine
language
program
can
return
to
BASIC by
executing
the assembly language
RTS
instruction
.
RTS
will
pull
the
return
location
within
the BASIC
program
from
the
hardware stack.
However
,
before
RTS
can be used
to
pull
the
return
location
off
the stack, all data
on
the stack related
to
function
arguments
must have
been
pulled
off
the stack. This includes
both
the
arguments
themselves
as
well
as
the
argument
count.
Even
if
there
are
not
arguments, the machine language
program
must
pull
the
argument
count
off
the stack
before
returning
to
the
BASIC
program
.
VAL
The VAL
function
converts its string
argument
to
a
numeric
value. The first character
of
the string
argument
must be a
numeric
character.
Otherwise
,
an
error
will
occur.
The
numeric
characters in the string
argument
will
be
converted
to
their
numeric
equivalents
until
a
non-numeric
string character
is
encountered
.
CONFIGURATION
VAL
(a$)

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