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 #360 background imageLoading...
Page #360 background image
Chapter
11
1
Technical
Information
Accessing String Variables
If the parameter passed in
a
CALL statement is
a
string expres-
sion, the parameters offset points to the
string descriptor.
If the
argument passed in
a
USR function call is a string expression,
the
DX
register points
to
the
string descriptor.
The
string descriptor
is a 3-byte area
of
memory that points to
the text
of
the string. The
string descriptor
contains the
following:
Byte 0 contains the length
of
the string (0 to 255).
Byte
1
contains the lower
8
bits
of
the string
starting address in BASIC’s data segment.
Byte 2 contains the upper
8
bits
of
the string
starting address in BASIC’s data segment.
The text of the string may be altered by the subroutine, but the
length
of
the string
must not
be changed. BASIC cannot
cor-
rectly manipulate strings if their lengths are modified by exter-
nal routines.
Since the
string descriptor
points
to
an area
of
memory in your
BASIC program, you must be careful not to alter
or
destroy your
program. To avoid unpredictable results, add the concatenation
symbol
(+)
to the string. This forces the string
to
be copied into
string space, where the string may be modified without affecting
the program.
Example
20 A$
=
“MONTHLY SALES REPORT”
+
File Control Block
A
file control block is
a
storage area in BASIC’s data segment
that contains information BASIC needs
for
all functions per-
formed on that file. When you execute the VARPTR function and
specify the buffer number, BASIC returns the address
of
the
BASIC file control block
for
that file. Note that this is the BASIC
file control block, not the
DOS
file control block. The address is
specified
as
an offset into BASIC data segment. In this section
we define the information in the file control block. Offsets are
relative
to
the value returned by VARPTR. Length is in bytes.
358

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