Download Print this page

Radio Shack TRS-80 Owner's Manual page 131

Mini-disk operation disk operating system disk basic programming language
Hide thumbs Also See for TRS-80:

Advertisement

immmmmmmmmmmmmsmmmmmmmmmmmm
mmmmmsim
Examples
NAME
Renumbers
the entire
program:
10,
20, 30,
.
.
.
NAME
6000*50130 .100
Renumbers
all
lines
numbered from 5000
up; the
first
renumbered
line will
become
6000, and
the
following
lines will
be incremented by
100. All
line
references within
your
program
will
be
renumbered
also.
USRn
Call
to
User's
External Subroutine
r
pj*
usr.i
(nmexp)
where
n
specifies
one
of
ten available
\isn
caiis.
/?
=
0.1,2.
.
.9.
If
/fls
omitted, zero
is
assumed.
nmexp
is
an
integer
from
-
32788
to
32767
artri
is
passed
3S an iriegsr
argument
to
the routine.
These
functions
(usro through USR9)
transfer
control
to
machine-language
routines
previously defined with
defusr«
statements.
When
a
urs
call
is
encountered
in
a statement, control
goes
to
the
address
specified
in the
defusrm
statement.
This address
specifies
the entry point
to
your
machine-language
routine.
Note:
If
you
call
a
usrm
routine before defining the routine entry point
with
defusr/i,
an
illegal function
call
error will occur.
You
can
pass
one argument and
retrieve
one
output value
directly
via the
usr
argument;
or
you can
pass
and
retrieve
arguments
indirectly
via
poke
and
peek
statements.
Example
1.0
DEFUSR1=&H7D00
20 REM...
MORE PROGRAM LINES HERE
100
A=USRi(X)
The
effect
of
this
sequence
is
to:
:
3*giwygBFV~:T:*i
c
- ;!".:-
_;__
-V
-
.:.!
...
'
:
'"
'....:"""
.;...
•....
113

Advertisement

loading

This manual is also suitable for:

Model iii