Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Assembly Language - <b>function 27h (39) random block read, using fcbs</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
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 1Ah 21h 3Fh FCB

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson