Special Open And Close Statements For Direct Access - Commodore vic-1540 User Manual

Table of Contents

Advertisement

addresses of 0 and 1, respectively. The DOS automatically interprets these
secondary addresses as LOAD and SAVE functions. Unless these functions are
desired when opening files, avoid secondary addresses of 0 and 1. The remaining
numbers, 2 through 14, may be used as secondary addresses to open up to five
channels for data.
Special OPEN and CLOSE Statements for Direct Access
The BASIC statement:
OPEN 2, 8,4, "#"
or
OPEN 2, 8,4, "#7"
opens a channel to one buffer, to be used with the block commands. The first
available buffer is allocated to channel 4 in the first example. The second
example is an attempt to allocate buffer 7 to the channel. If the buffers are not
available, a NO CHANNELS error condition is generated. The explicit buffer
allocation can be used to reserve a buffer for position dependent code as in the
case of an execute command.
You can find the number of the allocated buffer by executing a GET# state
ment. The byte transmitted is the buffer number. The only time you can get a
buffer number is before any write or read operation to that buffer.
The CLOSE statement clears the opened channel and writes the BAM to the
diskette that was last used by that channel. It is recommended that to avoid con
fusion, you limit yourself to accessing one drive with any direct access channel.
DISK UTILITY COMMAND SET
The disk utility command set consists of the following commands:
Commands
BLOCK-READ
BLOCK-WRITE
BLOCK-EXECUTE
BUFFER-POINTER
BLOCK-ALLOCATE
BLOCK-FREE
memory-write
memory-read
memory-execute
USER
Abbreviations
B-R
B-W
B-E
B-P
B-A
B-F
M-W
M-R
M-E
U
General Format
"B-R:"ch,dr,t,s
"B-W:"ch,dr,t,s
"B-E^'ch.dr.t.s
"B-P:"ch,p
"B-A:"dr,t,s
"B-F:"dr,t,s
"M-W"adl/adh/nc/data
"M-R"adl/adh
"M-E"adl/adh
"Ui:parms"
36

Advertisement

Table of Contents
loading

Table of Contents