User`s manual

with an important difference: the way USERl and USER2 work with the
buffer-pointer.
The BLOCK-READ command reads up to 256 characters, but stops
reading when the buffer-pointer stored with the block says that block is finished.
The USERI command performs the BLOCK-READoperation, but first forces
the pointer to 255 in order to read the entire block of data from the disk.
FORMAT FOR USERl COMMAND:
PRINT# file#, "VI :,. channel, drive, track, block
or
PRINT# file#, "VA;" channel, drive, track, block
There is no difference between the VI and VA designations for this
. command.
The BLOCK-WRITEcommand writes the contents of the buffer to the
block on the disk along with the value of the buffer-pointer. The USER2
command writes the buffer without disturbing the buffer-pointer value already
stored on that block of the diskette. This is useful when a block is to be read in
with BLOCK.READ, updated through the BUFFER-POINTER and PRINT#
statements, and then written back to the diskette with USER2.
FORMAT FOR VSER2 COMMAND:
PRINT# file#, "V2;" channel, drive, track, block
or
PRINT# file#, "VB:" channel, drive, track, block
For a more complex sample program, see appendix B.
7. RELATIVEFILES
Relative files allow you to easily zero in on exactly the piece of data that
you want from the file. It is more convenient for data handling because it allows
you to structure your filesinto records, and into fields within those records.
The DOS keeps track of the tracks and sectors used, and even allows
records to overlap from one block to the next. It is able to do this because it
establishes side sectors, a series of pointers for the beginning of each record.
Each side sector can point to up to 120 records, and there may be 6 side sectors
in a file. There can be up to 720 records in a file, and each record can be up to
254 characters, so the file could be as large as the entire diskette.
33