Download Print this page

Radio Shack TRS-80 Model II Reference Manual page 225

Disk operating system
Hide thumbs Also See for TRS-80 Model II:

Advertisement

Technical Information
RAMDIR
Get Diskette Directory/Free Space into
RAM
(function code 53)
This routine allows you to examine a diskette directory (one entry or the entire
directory) or determine the diskette's free space. The information is written into a
RAM
buffer.
Only non-system files will be included in the
RAM
directory.
Entry Conditions
A=53
B
=
Drive Number, binary 0, 1,2, or 3
C
=
Function switch:
Contents of C
o
1-96
255
Result
Gets entire directory into
RAM
in the format described below.
Gets one specified directory record into
RAM
(if it exists) in the
format described below.
Gets free-space information in the format described below.
(HL)
=
Buffer area:
If C
=
0, compute buffer size by this formula:
Number ofbytes required
=
34
*
(#
ofnon-system files)
+
1.
On a data diskette, there can be a maximum of 96 non-system files; therefore the
largest possible directory would require a buffer size of3265 bytes.
If C
=
1-96, buffer must be 34 bytes long.
If C
=
255 (free space info desired), buffer must be 4 bytes long.
Exit Conditions
./
NZ
=
Error occurred. Register A contains
TRSDOS
error code.
Z
=
No error.
(HL)
=
directory orfree-space info.
261

Advertisement

loading