Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with 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 MS-DOS system call 0x27 to read 'reccnt' number of
    records into memory at the current disk transfer address.  Records
    read are based on the 'random record' field of an open FCB pointed to
    by 'fcbptr'.  Because the 'random record' field is advanced by the
    number of records read, it gives the total number of records actually
    read.

       Returns:     The following values, depending on the result of the
                    read operation:

                    0    All records read
                    1    End-of-file reached; last record
                               read is complete
                    2    Reading all records would wrap around
                              address 0xFFFF (as many records as possible
                              were read).
                    3    End-of-file reached; last record
                              is incomplete

   Portability:     MS-DOS only.


See Also: randbwr()

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