Download Print this page

Radio Shack TRS-80 model III Owner's Manual page 43

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

Advertisement

You
may
want
to
use
create
to
prepare
a
file
which
will
contain a
known
amount
of
data.
This
will
usually
speed up
file
write operations.
File
reading
will
also
be
faster,
since pre-allocated
files
are
less
segmented
or dispersed
on
the
disk
requiring
less
motion
of
the
read/write
mechanism
to
locate the
records.
Examples
CREATE DATAFILE/BAS <REC=300, LRL=0)
Creates
a
file
named
datafile/bas, and
allocates
space
for
300
256-byte
records.
CREATE NAMES/TXT. IRIS
(
LRL=64
iREC
=
50
)
Creates a
file
named
names/txt
protected
by
the
password
iris.
The
file
will
be
large
enough
to
contain
50
records,
each
-64
bytes long,
CREATE PAYROLL/BAG
Creates
a
file
named
payroll/bas
but
allocates
no
space
to
it.
Sample Use
Suppose you
are
going
to
store
personnel information
on no
more
than
250
employees, and each
data record
will
look
like
this:
Name
(Up
to
25
letters)
Social Security
Number
(11
characters)
Job
Description
(Up
to
92
characters)
Then
your
records
would
need
to
be
25
+
1
1
+
92
-
128 bytes long.
You
could
create
an
appropriate
file
with
this
command:
CREATE PERSONNL/TXT
(
REC
=
250
,LRL= 128
)
Once
created,
this
pre-allocated
file
would
allow
faster
writing than
would
a
dynamically
allocated
file,
since
trsdos would
not
have
to
stop writing
periodically
to
allocate
more
space
(unless
you exceed
the
pre-allocated
amount).
DATE
Reset or
Get
Today's
Date
mm/dd/yyi$
the specification
for
the
month (mm),
day
(*M)
and
36

Advertisement

loading