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 #357 background imageLoading...
Page #357 background image
Chapter
11
I
Technical Information
Exiting
the
Subroutine
The called routine must execute a RET
number
statement
to
ad-
just the stack to the
start
of
the calling sequence. The value
of
number
is 2 times the number
of
parameters in the parameter
list.
CALLS
Statement
The CALLS statement is the same
as
CALL except the argu-
ments are passed
as
segmented addresses. CALLS should be
used
to
access MS-FORTRAN routines.
Because MS-FORTRAN routines need to know the segment
value
for
each argument passed, the segment is pushed
first,
fol-
lowed by the offset. CALLS pushes
4
bytes
for
each argument;
therefore, the number in the RET statement (RETn) must be
4
times the number
of
arguments.
USR
Function
When the USR statement is executed, the operating system loads
the CS (code segment) register with the value specified in the
last DEF SEG statement. If you are accessing
a
subroutine
within BASIC’s work area and no DEF SEG is required, the CS
register is loaded with the address
of
BASIC’s work area. This
address is shifted left
4
bits; which is the same as multiplying it
by 16 decimal (10 hexadecimal). Then the offset
of
the subrou-
tine is added
to
the segment address.
Example
17100
+
0020
=
17120
This is the absolute address
of
the first instruction in the
subroutine.
355

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