EasyManua.ls Logo

Commodore 2031 - Print Termination; Channel Restrictions; Spanning

Commodore 2031
98 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
The relative channel requires three memory buffers form the system, whereas
sequential files only require two. Since there are twelve channels in the system
and two of these are used in directory searches and internal functions, only three
relative channels can be open at one time. The highest number of buffers that
can be used is ten, which limits the total number of channels which can be open
at any one time.
Spanning
If a record was found to be on the boundary between two data blocks, that is,
starting in one data block and finishing in another, then the DOS would read the
first segment as well as any following records in the second data block. In
practice, the records of most relative data files will span across data blocks. The
only exceptions are record size 1, 2, 127, and 254. These divide evenly into the
254 size of the data block and spanning is unnecessary. This method of spanning
has the advantage of requiring no system memory overhead aside from that
required for the side sector blocks in the relative files. When a record is written
upon through the PRINT# statement, the data block is not immediately written
out. It is only written out when the DOS moves beyond the particular data block
in which that record resides. This can occur through successive printing to
sequential records, or when positioning to another record outside of that partic-
ular block.
NOTE
Because of the spanning feature, two channels should
not be open to a relative file at the same time if
either channel will be writing to the same file. An
update may be made in the channel's particular
memory buffer area, but the change may not be
made on disk until the DOS moves that particular
block. There is no restriction on this, however,
and in certain instances where the file is only read
from, it may be advantageous to have more than
one channel open to a single relative file.
Print Termination
The DOS terminates the printing of a record by detecting the EOI signal which
is generated with each PRINT# statement. If the PRINT# statement goes over the
maximum record size, error 51 -record overflow- will be generated. Any data
overflow will be truncated to fit the number of characters specified by the record
63

Table of Contents

Other manuals for Commodore 2031

Related product manuals