DIR vs SDIR on I: drive

62 views
Skip to first unread message

Chris Scullion

unread,
Mar 3, 2023, 10:03:02 AM3/3/23
to IMSAI 8080esp
I noticed when I DIR the I: drive, I see 9 files listed.  But when I SDIR that drive, it shows 64 files.  I thought maybe that SDIR was showing files for all users, but that doesn't appear to be the case.  I get the same behavior when I do the same thing under z80pack.

I have drive I set to disks/library/hd-tools.dsk.

So why the difference?

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Richard Deane

unread,
Mar 4, 2023, 4:06:25 AM3/4/23
to IMSAI 8080esp

Richard Deane <rwd...@gmail.com>
07:16 (1 hour ago)
to Chris, IMSAI

DIR wont show the files with SYS  attribute  set - SDIR does.
You can use the  STAT command to set or clear the attribute.
> STAT DUMP.COM display information about the file DUMP.COM in the current user area code, on the currently selected disk device.
> STAT B:PIP.COM display information about the file DUMP.COM in the current user area code, on the "B" disk device. 
> STAT A:*.COM display information about all the files with the "COM" extension in the current user area code, on the "A" disk device.

The STAT program will display a file with the SYS file attribute with parentheses around the file name. The STAT program is the only way to display files with the SYS file attribute. Files with the SYS attribute will not be displayed by the DIR shell command. The STAT program can be used set the attributes on one or more disk files. The file name may contain wild-card characters and specify a disk identifier. There are two file attributes under the CPM 2.2 operating system; read only and system. When a file is set to read only the CPM BDOS will prevent programs from altering the file in any way. The read only attribute is saved so unlike the disk device read only setting file read only attributes are not affected by a warm or cold boot of CPM.

> STAT DUMP.COM $R/O set the file DUMP.COM in the current user area code on the selected disk device to read only. 
> STAT DUMP.COM $R/W set the file DUMP.COM in the current user area code on the selected disk device to read and write.
> STAT B:*.COM $R/O set all the files with the extension ".COM" in the current user area code on the "B" disk device to read only.

The SYS file attribute controls which files will be displayed by the DIR shell command. A file with the SYS attribute will not be displayed by the DIR command file listing. Only the STAT program can list files with the SYS attribute.

> STAT DUMP.COM $SYS set the file DUMP.COM in the current user area code on the selected disk device to not display in a directory listing. 
> STAT DUMP.COM $DIR set the file DUMP.COM in the current user area code on the selected disk device to be displayed in a directory listing 
> STAT B:*.COM $SYS set all the files with the extension ".COM" in the current user area code on the "B" disk device to not display in a directory listing.

Cheers
Richard

Reply all
Reply to author
Forward
0 new messages