RD.LNK/WR.LNK - ***DELETED*** use READ/WRITE.

Usage:

rd.lnk( filevec, buffer [, sector [, nwds] ] );
wr.lnk( filevec, buffer [, sector [, nwds] ] );

Where:

filevec
is the "ret" vector returned by ACC.FIL. In batch, the first word will contain the BCD filecode, and in TSS the first two words will contain the aftname. The status return and file descriptor words are used by RD.LNK and WR.LNK.
buffer
is a buffer into which RD.LNK places the data it reads and from which WR.LNK takes the data it writes. "buffer" must be big enough to hold "nwds".
sector
is ignored and is specified only for compatibility with RD.RAN/WR.RAN.
nwds
is the number of words to read or write. When writing, if "nwds" is not a multiple of 64, the hardware writes zeroes onto the remaining fraction of a sector. If "nwds" is not specified, the default is 320 for both reading and writing. "nwds" must lie between 1 and 4096 inclusive.

Description:

RD.LNK and WR.LNK are used to perform binary I/O on sequential files which have been opened by a call to ACC.FIL. Each call to RD.LNK/WR.LNK advances the file position by the number of llinks required to hold the data.

In WR.LNK, if the write gets an eof status, it will attempt to grow the file by the amount needed to hold the data. If the grow succeeds, a write is reissued for the remaining data. If the grow does not succeed, WR.LNK does not make a second attempt at growing.

In TSS, an eof status will be faked if an attempt is made to read from a null file.

It is recommended that you use the routines READ and WRITE instead of RD.LNK and WR.LNK. If you feel you must use RD.LNK and WR.LNK, remember that they only work on sequential files.

See Also:

expl b lib read
for the recommended functions.
expl b lib acc.fil
for the format of "filevec".
expl b lib .grow
for details on the file growth algorithm.

Copyright © 1996, Thinkage Ltd.