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 ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
operating system for such a purpose. <strong>The</strong> system's device I/O handler also<br />
makes use of this bit <strong>to</strong> determine the necessity for disk file character<br />
I/O.<br />
Bit 6 This bit will be set <strong>to</strong> a "1" if the file was opened with UPDATE or greater<br />
access. It indicates <strong>to</strong> the CLOSE routine that the application has the<br />
authority <strong>to</strong> reset the "file open bit" in the direc<strong>to</strong>ry entry record for the<br />
respective file. <strong>The</strong> CLOSE routine will not update the direc<strong>to</strong>ry entry of a<br />
file without this bit being set in the FCB.<br />
Bit 5 This bit indicates that the opened file is a Partitioned Data Set. <strong>The</strong><br />
system will set this bit when the file is opened if it detects the presence<br />
of the PDS attribute in the direc<strong>to</strong>ry entry of the file (DIR+0, bit 5).<br />
Bit 4 This bit is reserved for future use by the DOS.<br />
Bit 3 This bit is reserved for future use by the DOS.<br />
Bit 2 This bit will be set <strong>to</strong> a "1" if any WRITE operation is performed by the<br />
system on this file while it is open. <strong>The</strong> bit is used specifically <strong>to</strong> update<br />
the MOD flag in the file's direc<strong>to</strong>ry entry record when the file is closed.<br />
Bit 1 This bit is reserved for future use by the DOS.<br />
Bit 0 This bit is reserved for future use by the DOS.<br />
6.4.2 Input/Output Status - <br />
This byte contains I/O buffer status flag bits used in read/write operations by the<br />
system. <strong>The</strong> STATUS byte uses each bit as a flag per the following specifications:<br />
Bit 7 If this bit is set <strong>to</strong> a "1", it indicates that I/O operations will be either<br />
record operations of logical record length (LRL) less than 256 (1-255) or<br />
character I/O. If set <strong>to</strong> a "0", only full sec<strong>to</strong>r operations or character I/O<br />
will be performed. If you are going <strong>to</strong> utilize only full sec<strong>to</strong>r I/O, system<br />
overhead is reduced by specifying the LRL at open time <strong>to</strong> be 0 (indicating<br />
256). An LRL of other than 256 will set bit 7 <strong>to</strong> a "1" when the file is<br />
first opened.<br />
Bit 6 When a file's records have been accessed randomly rather than (or in<br />
addition <strong>to</strong>) sequentially, the system must be prohibited from the altering<br />
the Ending-Record-Number (ERN) unless the file is extended beyond its<br />
current ERN. This bit is used for that status. If set <strong>to</strong> a "1", it indicates<br />
that the ERN is <strong>to</strong> be set <strong>to</strong> the Next-Record-Number (NRN) only if the NRN<br />
exceeds the current value of ERN. Whenever the position SVC (@POSN) is<br />
invoked, it will au<strong>to</strong>matically set bit 6. If bit 6 is set <strong>to</strong> a "0", then ERN<br />
in the FCB will be updated on every WRITE operation.<br />
Bit 5 It is always necessary for the system <strong>to</strong> know whether or not the file buffer<br />
contains the current disk sec<strong>to</strong>r as specified by the NRN. This bit is<br />
maintained for that use. If it is set <strong>to</strong> a "0", then the disk file buffer<br />
contains the current sec<strong>to</strong>r denoted by NRN. If it is set <strong>to</strong> a "1", then the<br />
file buffer does not contain the current sec<strong>to</strong>r. When a sec<strong>to</strong>r is read in<strong>to</strong><br />
the disk buffer, the system will reset this bit <strong>to</strong> show that the buffer<br />
currently holds the disk sec<strong>to</strong>r specified by the NRN. During character I/O,<br />
the first character GET request will force the system <strong>to</strong> transfer a full<br />
disk sec<strong>to</strong>r in<strong>to</strong> the file buffer and reset the "buffer current" bit. Bit 5<br />
is au<strong>to</strong>matically set when the character in the last byte of the buffer has<br />
been transferred <strong>to</strong> the application in the GET requests. This will then<br />
indicate that the buffer is not current so that the next GET will force a<br />
read of the next sec<strong>to</strong>r.<br />
Bit 4 During file I/O, an application may request a repositioning of the file's<br />
NRN-OFFSET pointer. This may be requested via an @BKSP, @POSN, @REWIND,<br />
6-14