Function 27h (39)        Random Block Read, Using FCBs

Reads one or more records into memory at the current Disk Transfer
Address (DTA).

On entry:      AH         27h
CX         Number of records to read
DS:DX      Pointer to an opened FCB

Returns:       AL         00h      If read was successful
01h      If EOF ecountered, and last record
complete
02h      If DTA too small (segment wrap)
03h      If EOF encountered, last record was
partial
CX         Number of records read

Network:       Requires Read access rights

                                                                          

This function reads in the number of records specified by CX (CX must
be greater than zero), beginning at the file address specified by the
random-record (offset 21h) and record-size (0Eh) fields of the FCB.
The current block and current record fields are set to reflect the
random-record field, and the records are read into memory at the
current Disk Transfer Address.

Notes:         Use Function 1Ah to set the Disk Transfer Address.
If the transfer of data would cause segment
wraparound, an error 2 is generated.

If an EOF is encountered and the last record read
was not complete, the function pads the last record
with zeros to the requested size.

After the requested records have been read, this
function updates the random-record, current-block,
and current-record fields of the FCB to point to the
next record. Function 21h is similar to this
function except: 1) Function 21 does not
automatically update these three fields, and 2)
Function 21h can read only a single record per call,
whereas this function can read multiple records.

See also: 14h
See also: 1Ah
See also: 21h
See also: 3Fh
See also: FCB

27h (39) Random Block Read, Using FCBs