Vector Basic Interpreter Basic 80 Reference Manual - page 155
CALL GIVABF
RET
To return
additional
values
to the program,
load
them
into
memory
and read
them with
the PEEK
function.
There
are several
methods
by which
a program
may
call
more
than
one USR
routine.
For example,
the
starting
address
of
each
routine
may
be POKEd
into
USRLOC
prior
to
each
USR
call,
or the argument
to USR could
be an index
into
a table
of USR routines.
In the Extended
and Disk
versions,
the
format
of
the
USR
function
is
where
is from 0 to 9 and the argument
is any
numeric
or
string
expression.
specifies
which
USR
routine
is being
called,
and corresponds
with
the digit
supplied
in
the
DEl'
USR
statement
for
that
routine.
If
is
omitted,
USRO
is assumed.
The address
given
in the DEF
USR
statement
determines
the starting
address
of the subroutine.
When
the USR
function
call
is made,
register
A
contains
a
value
that
specifies
the type of argument
that was given.
The value
in A may be one of the following:
Value
in A
!m!.
g!
Argument
2
Two-byte
integer
(two's complement)
3
String
4
Single
precision
floating
point
number
8
Double
precision
floating
point
number
If the argument
i~ a number,
the
[H,L] register
pair
points
to
the
Floating
Point
Accumulator
(FAC) where
the argument
is stored.
FAC-3
contains
the lower
8 bits
of the argument
and
FAC-2
contains
the upper
8 bits
of the argument.