EasyManuals Logo

Tandy 1000 Basic Reference Manual

Default Icon
411 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 #142 background imageLoading...
Page #142 background image
Chapter
10
I
BASIC Keywords
DEF
USR
Statement
DEF
USR[number]
=
offset
Defines the user number and segment offset
of
a
subroutine to
be called by the USR function.
Number
may be an integer in the range 0 to 9. If you omit
num-
ber,
BASIC assumes USR0.
Offset
is an integer in the range 0
to
65535.
BASIC computes
where the subroutine begins in memory by adding the
offset
to
the current segment address as set by DEF SEG. BASIC trans-
fers control to this address when you execute the USR function.
If the subroutine is not in BASIC’s data segment, you must exe-
cute a DEF SEG statement before the USR function.
A
program may contain any number
of
DEF USR statements, al-
lowing access to
as
many subroutines
as
necessary. However,
only 10 definitions may be in effect at one time.
See the section “Interfacing With Assembly-Language Subrou-
tines” in Chapter
11
and USR in this chapter
for
more details.
Examples
DEF
USR3
=
6H0020
DEF
SEG
=
&HI700
USR3 begins
at
20H bytes into the current data segment which
is set at 1700 hexadecimal. When your program calls USR3, con-
trol branches to your subroutine beginning
at
absolute address
17020. (1700*10
+
20).
140

Table of Contents

Other manuals for Tandy 1000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tandy 1000 and is the answer not in the manual?

Tandy 1000 Specifications

General IconGeneral
ProcessorIntel 8088
Processor Speed4.77 MHz
RAM128 KB (expandable to 640 KB)
Operating SystemMS-DOS 2.11
ManufacturerTandy Corporation
Release Year1984
StorageSingle or double 5.25" floppy disk drive (360 KB), optional hard drive
SoundTandy 3-voice sound
PortsParallel, Serial
GraphicsCGA (Color Graphics Adapter)
Graphics Modes320x200, 640x200

Related product manuals