User`s guide

BDOS FUNCTION 20: READ SEQUENTIAL
Entry Parameters:
Registers C: 14H
DE: FCB Address
Returned Value:
Registers A: Error Code
H: Physical Error
The Read Sequential function reads the next 1 to 128 128-byte records from a file
into memory beginning at the current DMA address. The BDOS Multi-Sector Count
(see Function 44) determines the number of records to be read. The default is one
record. The FCB addressed by register pair DE must have been previously activated
by an Open or Make function call.
Function 20 reads each record from byte cr of the extent, then automatically
increments the cr field to the next record position. If the cr field overflows, then the
function automatically opens the next logical extent and resets the cr field to 0 in
preparation for the next read operation. The calling program must set the cr field to
0 following the Open call if the intent is to read sequentially from the beginning of
the file.
Upon return, the Read Sequential function sets register A to zero if the read oper-
ation is successful. Otherwise, register A contains an error code identifying the error
as shown below:
01 Reading unwritten data (end-of-file)
09 Invalid FCB
10 Media change occurred
255 Physical Error; refer to register H
3-29
BDOS Function Calls CP/M 3 Programmers Guide