The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...
The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...
The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Bit 3 Specifies the visibility; if "1", the file is INVisible <strong>to</strong> a DIRec<strong>to</strong>ry<br />
display or other library function where visibility is a parameter. If a "0",<br />
then the file is declared VISible.<br />
Bits 0-2 Contain the access protection level of the file. <strong>The</strong> 3-bit binary value is<br />
encoded as follows:<br />
0 - FULL 1 - REMOVE 2 - RENAME 3 - WRITE<br />
4 - UPDATE 5 - READ 6 - EXEC 7 - NO ACCESS<br />
5.4.2 FLAG FIELD - <br />
This field contains four file flags in bits 7-4. <strong>The</strong> low-order nibble is associated with<br />
the DATE field. <strong>The</strong> flags are encoded as follows:<br />
Bit 7 When this bit is set, the system will be kept from deallocating any unused<br />
space at the end of the file when the file is closed. This bit will be set<br />
<strong>to</strong> a "1" if the file was "CREATEd" by the DOS library command, CREATE. Such<br />
a file will never shrink in size. <strong>The</strong> file will remain as large as its<br />
largest allocation.<br />
Bit 6 This flag is termed the "MOD flag". If this flag is set <strong>to</strong> a "1", it<br />
indicates that the file has not been backed up since its last modification.<br />
<strong>The</strong> BACKUP utility is the only DOS facility that will reset this flag. It is<br />
set during the file close operation if the File Control Block (FCB+0, Bit 2)<br />
indicated a modification of file data.<br />
Bit 5 This bit is set by the system when a file is opened with UPDATE or greater<br />
access. It is used <strong>to</strong> detect the presence of an open file for subsequent<br />
OPENs of the same file. <strong>The</strong> bit is reset by the CLOSE operation.<br />
Bit 4 This bit is used internally by the system.<br />
If the ATTRIBUTE field identifies the record as an FXDE, then this entire byte (flags and<br />
month) will contain the Direc<strong>to</strong>ry Entry Code of the direc<strong>to</strong>ry entry forward linked <strong>to</strong><br />
this one. This entry is the backward link.<br />
5.4.3 MODIFICATION DATE - <br />
This field is composed of 12 bits, the low-order nibble of DIR+1 and the entire byte of<br />
DIR+2. It contains the month, day, and year for the day that the file was last modified.<br />
<strong>The</strong> field is encoded as follows.<br />
Bits 11-8 Contain the binary month of the last modification date. If this field<br />
is a zero, the system date was not set when the file was established<br />
nor since if it was updated.<br />
Bits 7-3 Contain the binary day of last modification.<br />
Bits 2-0 Contain the binary YEAR - 1980. That is <strong>to</strong> say that 1980 would be<br />
coded as 000, 1981 as 001, 1982 as 010, etc.<br />
5.4.4 EOF OFFSET - <br />
This field contains the end-of-file offset byte. It points <strong>to</strong> the position in the ending<br />
sec<strong>to</strong>r of where the next byte can be placed. If EOF OFFSET is a zero, it means that a<br />
full sec<strong>to</strong>r of 256 bytes had been written <strong>to</strong> the last sec<strong>to</strong>r of the file and the next<br />
byte must be written <strong>to</strong> a new sec<strong>to</strong>r. This byte, and the ending record number (ERN), form<br />
a triad pointer <strong>to</strong> the byte position immediately following the last byte written.<br />
5-11