NEC CP/M-86 System Reference Manual page 51

Advanced personal computer
Table of Contents

Advertisement

Basic Disk Operating System (BDOS) Functions
READ SEQUENTIAL
ENTRY
CL: 14H
DX: FCB
Offset
RETURN
FUNCTION 20
AL: Return Code
READ SEQUENTIAL
Given that the FCB addressed by DX has been activated through an Open File or
Make File function (function 15 or 22), the Read Sequential function reads the next
128-byte record from the file into memory at the current DMA address. The record
is read from position" cr" of the extent, and the" cr" field is automatically incre-
mented to the next record position. If the
"Cf"
field overflows, the next logical extent
is automatically opened and the "cr" field is reset to zero in preparation for the next
read operation. The "cr" field must be set to zero by the user following the open call
if the intent is to read sequentially from the beginning of the file. The value OOH is
returned in register AL if the read operation was successful. A value of 01 H is
returned if no data exists at the next record position of the file. The no data situation
is encountered at the end of a file. However, it can also occur if an attempt is made to
read a data block which has not been previously written, or an extent which has not
been created. These situations are usually restricted to files created or appended by--
use of the BDOS Write Random function (function 34).
WRITE SEQUENTIAL
ENTRY
CL: ISH
DX: FCB
Offset
RETURN
FUNCTION 21
AL: Return Code
WRITE SEQUENTIAL
Given that the FCB addressed by DX has been activated through an Open File or
Make File function (function 15 or 22), the Write Sequential function writes the
128-byte data record at the current DMA address to the file named by the FeB. The
record is placed at position "cr" of the file, and the "cr" field is automatically
incremented to the next record position. If the" cr" field overflows, the next logical
extent is automatically opened and the" cr" field is reset to zero in preparation for
the next write operation. Write operations can take place into an existing file, in
which case newly written records overlay those which already exist in the file. The
"cr" field must be set to zero by the user following an open or make call if the intent is
4-17

Advertisement

Table of Contents
loading

Table of Contents