Download Print this page

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

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

Advertisement

RAM
Directory
Format
The
directory
is
made
up
of records,
one
per
file.
All values are
hexadecimal.
Each
record placed
in
user
ram
is
in
the
following
format:
Byte
Number
Contents
0-14
filename/ ext:d
(left-justified
followed
by
spaces)
15
Protection Level, binary
0-6
16
Byte
eof, binary 0-255
17
Logical record
length,
binary
0-255
18-19
Last
sector
number
in
file,
binary lsb,
msb
20-21
Number
of Granules
allocated (LSB,msb)
binary
22
"
+
"
(marks
the
end
of
directory
list
after entire directory.)
Free Space
Message Format
***nnnnn
Free Granules***
Where
nnnnn
is
a
decimal number.
The
entire
message
is
ASCII-coded.
$FILPTR—
17037/X'428D'
This
routine
provides information
on any
user
file
that
is
currently
open.
It
enables
you
to
obtain the drive
number
and
the logical
file
number
for
any
file
and
should be used
in
conjunction with
$ramdir.
Entry Condition
(DE)
=
Data
Control
Block
(dcb) defined
when
file
was
opened.
CALL
SFILPTR
Exit
Conditions
nz
=
Error occurred.
z
= No
error.
The
following
registers are
set
up:
B
=
Which
drive contains the
file
(0,1,2, or
3).
c
=
Logical
file
number
(1-96)
Note: This
operates with user
files
only.
$CLOSE
17448/X'4428'
$close
closes a
file
from
the
last
processing done.
It
is
very
important
to
do
a $close
on
every
file
opened
before
the
program
ends.
If
you do
not close
a
file,
the directory entry for
this
file is
incorrect
if
any
new
records
have been
85

Advertisement

loading