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

 #include   <dos.h>

 int        abswrite(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

    abswrite() writes specific disk sectors.  The logical structure of
    the disk is ignored, along with all specifics about files, FATs and
    directories.  The disk sectors are written via DOS interrupt 0x26.
    '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 written.

    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 written
                in a single call.

See Also: absread()

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