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>absread() rea disk sectors</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
absread()                Rea Disk Sectors

 #include   <dos.h>

 int        absread(drive,nsects,sectno,buffer);
 int        drive;                       Drive number to read
 int        nsects;                      Number of sectors to read
 int        sectno;                      Beginning logical sector number
 void       *buffer;                     memory address

    absread() reads specific disk sectors.  The logical structure of the
    disk is ignored, along with all specifics about files, FATs and
    directories.  The disk sectors are read via DOS interrupt 0x25.
    'drive' is the drive number to read (0 = A, 1 = B, etc), 'nsects' is
    the number of sectors to read, 'sectno' is the beginning logical
    sector number, and 'buffer' refers to the memory address where the
    data is to be read.

    Returns:    If successful, 0 is returned.  -1 is returned on error,
                and 'errno' is set to the value of the AX register
                returned by the system call.

      Notes:    64K is the largest amount of memory that can be read in a
                single call.

See Also: abswrite()

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