User`s manual
The DOS contains commands for reading and writing directly to any track
and sector on the diskette. There are also commands for checking to see which
blocks (tracks & sectors) are available, and for marking off used blocks.
These commands are transmitted through the command channel
(channe[# 15), and tell the disk what to do with the data. The data must be read
later through one of the open data channels.
Opening a Data Channel for Random Access
When working with random access files,you need to have 2 channels open
to the disk: one for the commands, and the other for the data. The command
channel is OPENed to channel 15, just like other disk commands you've
encountered so far. The data channel for random access files is OPENed by
selecting the pound sign (#) as the file name.
FORMAT FOR OPENSTATEMENTFORRANDOMACCESSDATA:
OPEN file#, device#, channel#, "#"
or optionally
OPEN file#, device#, channel#, "# buffer#"
EXAMPLES OF OPENING RANDOM ACCESS DATA CHANNEL:
OPEN 5, 8, 5, "#" DON'T CARE WHICH BUFFER
OPENA.B.C,"#~
BLOCK-READ
FORMAT FOR BLOCK-READ COMMAND:
PRINT# file#, "BLOCK-READ:" channel, drive, track, block
or abbreviatedas .
PRINT# file#, "B-R:" channel, drive, track, block
This command will move one block of data from the diskette into the
selected channel. Once this operation has been performed, the INPUT# and
GET# statements can read the information.
27
TRACK NUMBER SECTORRANGE
TOTAL SECTORS
I to [7
o to 20
21
18 to 24 o to 18
19
25 to 30
o to 17 18
31 to 35
o to 16
17