Stat Utility

Monday, 16 February 2009 09:24 administrator
Print

The STAT program is provided to allow the user of a CPM system to view and change serial device, disk and file settings. The STAT program can display a reminder of its optional parameters using the "VAL:" parameter.

stat_val

 

Serial Devices: For serial devices the STAT program can be used to view and assign physical serial devices to the four logical devices; CON, LST, RDR, and PUN. In CPM 2.2 there are 11 physical serial devices split into four groups of four physical devices, one group for each of the logical serial devices.

The STAT program allows you to view the current serial device mappings using the "DEV:" parameter.

stat_dev 

The parameter "DEV:" causes STAT to display the current device mappings. The STAT program can be used to map a logical serial device. Here are some examples;

> STAT CON:=CRT: set the system console to the video display and keyboard. > STAT LST:=LPT: set the system printer to the line printer device.

Disk Devices: For disk devices the STAT program can be used to get information about a disk device and set disk device options. The "USR:" parameter is used to display the currently selected user area code as well as a list of all area codes on the selected disk device that contain files. The CPP command USER is used to set the current user area code. The "DSK:" parameter cause STAT to display information about the format of all disk devices that are mounted. Optionally you may specify a disk identifier before the DSK: parameter to select a specific disk.  The STAT followed by a disk identifier will display the available free space on a disk device. If no disk is specified the free space for all mounted disk devices will be displayed.

stat_dsk

> STAT B: displays the free space on disk "B" and the read/write settings.
The STAT program can be used to mark a disk device as read only. Once a disk is set read only a warm boot (press ^C) is required to clear the read only setting.
> STAT B:=R/O sets disk "B" to read only access until CPM is restarted by a warm or cold boot.

Disk Files: For disk files the STAT program may be used to view information about disk files and set disk file attributes. To view information about a file type the command "STAT filename.typ" at the CPM prompt. The file name may contain wild-card characters as well as a drive identifier.

stat_drive_space

> 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_file_info

> 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.
Last Updated on Monday, 16 February 2009 10:43