Download Print this page

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

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

Advertisement

"1TRS-80
MODEL
III
DISK
SYSTEM
Length),
the length
is
fixed
until
the
file is
closed.
To change
a
file's
lrl,
you
must close
it
and re-OPEN
it
with
the
new
lrl.
Each opening
of
the
file
sets
a single, fixed record-length,
trsdos
will
"block"
logical
records
into (or
from) one
physical record
for
maximum
space
utilization
on
the
disk.
Blocking
is
putting
more
than
one
logical
record
into
one
physical record.
For
instance,
four
64-byte
logical
records
will
fit
into
one
256-byte
physical record.
A
logical
record
may
be broken
into
two
parts
by trsdos
in
order
to
fill
the
last
portion of
one
physical record
entirely
before beginning
to
use
the
next physical
record
(i.e.
records
are
spanned). This occurs
when
the physical
record length
is
not
an even
multiple of
the logical
record
length.
If
the
user
wishes
to
do
his
own
blocking,
he
may
specify a
logical
record length
of
bytes
at
the
time of init/open and
must
himself
manage
the contents
of
the
physical record buffer area
of
256
bytes,
trsdos
will
not
move
a logical
record
for the
user
if
lrl
=
0; in this
particular
case
it
will
only
read/write the physical
record to/from
the buffer.
Once
control
is
shifted to
your program,
you
will
have
about
20
bytes of stack
size
left.
Fundamental
TRSDOS
I/O
Calls
There
are
17
fundamental
trsdos
routines
involved
in
handling
file i/o.
These
are:
$BACKSPACE
$POSN
$CLOSE
$PUTEXT
$DIVIDE
SRAMDIR
$DMULT
$READ
$FILPTR
$REWIND
$INIT
$SYNTAX
SKILL
$VERF
$OPEN
$WRITE
$POSEOF
The
detailed calling
sequences and
discussions
for
each of
these routines follow.
Note
that all
of these
system
calls
use
register
f
and do
not
restore
its
value
before
return.
In order
to
apply
this
data properly,
you
should read through
all
of
these descriptions
and
clear
up
all
of
the points
that
are
not
obvious
to
you by
using other reference
materials.
If
you
are successful
in
doing
this
you
will find
that
trsdos
is
a
workable
tool for
your
programming
ideas.
$INIT—
17440/X'4420'
$init
is
provided
as
an
entry point
to
trsdos which
will
create a
new
file
entry
in
the directory
and open
the
dcb
for
this
file.
$init
scans
the directory for the
filespec
name
given
in
the
dcb.
If
the filespec
name
is
found,
$init
simply opens
78

Advertisement

loading