EasyManua.ls Logo

Commodore 2031 - Block-Read; Block-Write

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 use of these characters permits sending both ASCII strings and integers.
Parameters not within the confines of quotation marks should be separated by
semicolons (;).
In the following discussions, a PRINT# is assumed in all examples.
BLOCK-READ
This diskette utility command provides direct access to any block on a diskette
in either disk drive. Used in conjunction with other block commands, a random
access file system may be created through BASIC. This command finds the
character pointer in the 0 position of the block. When a character in this position
is accessed with GET# or INPUT#, an End-or-Identify (EOI) is sent. This termi-
nates an INPUT# and sets the Status Word (ST) to 64 in the computer.
The format "B-R"ch;dr;t;s is illustrated in the following example.
Example:
"B-R"5;0;18;0
Reads the block from track 18, sector 0 into channel 5 buffer area.
After using BLOCK READ to transfer the data to the buffer, the data may be
transferred to memory by INPUT# or GET# from the logical file opened to that
disk channel (i.e. , using that secondary address).
The U1 command described under USER is similar to the BLOCK-READ
command.
BLOCK-WRITE
When this command is initiated, the current buffer pointer is used as the last
character pointer and is placed in the 0 position of the new buffer. The buffer is
then written to the indicated block on the diskette and the buffer pointer is left
in position 1.
The format "B-W"ch;dr;t;s is illustrated in the following example.
Example:
"B-W"7;0;35;10
Writes channel 7 buffer to the block on track 35, sector 10: BLOCK-
WRITE is not available with DOS 2.
44

Table of Contents

Other manuals for Commodore 2031

Related product manuals