Radio Shack TRS-80 Trsdos & Disk Basic Reference Manual page 100

Micro computer system
Hide thumbs Also See for TRS-80:
Table of Contents

Advertisement

DISK BASIC
UrLr
Ui3lv
(define entry
address
for
USR
routine)
DE¥\JSRn=nmexp
where
n
nmexp
equals
one
of the
digits 0,
1
,
... ,9
if
n
is
omitted,
is
assumed
specifies
the entry address
to
a
machine-language
routine.
This statement
lets
you
define the entry points
for
up
to
10 machine-
language
routines. (In
LEVEL
II,
where
only
one
USR
routine
is
available,
the entry point address
is
POKEd
into
RAM.)
Example:
106 DEFUSR3=&H?D00
Assigns the entry point
7D00
hex,
32000
decimal, to the
USR3
call.
When
your program
calls
USR3,
control
will
branch
to
your
sub-
routine
beginning
at
hex 7D00.
Here
are three
ways
to get a
machine
language
program
into
RAM
so
that
it
can be accessed
via a
USRn
call:
1
)
Use
the
TRS-80
Editor Assembler,
Radio Shack
Catalog
Number
26-2002,
to
convert the source
code
into
an object
file
on
tape;
then load
the tape
under
the
SYSTEM
command
(use
MEMORY
SIZE
to
protect the
code from
destruction
by
BASIC).
2)
Use
the
TRSDOS DEBUG
program
to
type
in
the
machine-
code
routine (then
DUMP
it
to disk
for safe-keeping);
call
DISK BASIC
and answer
MEMORY
SIZE
so
as
to
protect the
routine.
3)
Have your
DISK BASIC
routine
POKE
the routine (decimal
values for
each byte)
into
high
RAM.
MEMORY
SIZE
should
be
set
during
initialization
to
protect the
area
you
will
POKE
into.
See
USRn.
7-14

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents