Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo C - <b>randbrd() random block read</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
randbrd()                Random Block Read

 #include   <dos.h>

 int         randbrd(fcbptr,reccnt);
 struct fcb  *fcbptr;                    Pointer to structure
 int         reccnt;                     Number of records to be read

    randbrd() uses DOS system call 0x27 to read 'reccnt' number of
    records using the open FCB pointed to by 'fcbptr'.  The records are
    read into memory at the current disk transfer address.  They are read
    from the disk record indicated in the 'random record' field of the
    FCB.  The 'random record' field will be advanced by the number of
    records actually read and thus gives the total number of records
    read.

    Returns:    The following values are returned, based on the result of
                randbrd():

                    0    All records are read
                    1    End-of-file is reached and the last record
                               read is complete.
                    2    Reading records would have wrapped around
                              address 0xFFFF (as many records as possible
                              are read).
                    3    End-of-file is reached with the last record
                              incomplete.

See Also: randbwr()

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