DOS Fn 21H: Read Random File Record
Compatibility: 1.0+
Expects: AH 21H
DS:DX address of an opened FCB
──────────────────────────────────────────────────────────────────
Returns: AL 0 if read was successful (and DTA is filled with data)
1 if EOF was reached and no data was read
2 if DTA + FCB RecSize would overrun a segment (no read)
3 if EOF and a partial record was read (padded with 0s)
──────────────────────────────────────────────────────────────────
Info: Sets FCB curBlk and curRec to the agree with randomRec then reads
recSize bytes from the specified file address, placing the data
into memory starting at the DTA.
Notes: ■ Be sure to set recSize to the record length and randomRec in
the FCB to the desired record number.
See Also: Fn 3fH (read file via handle)
FCB File I/O
Handle-Oriented File I/O
DOS Functions
-♦-