Write_Sectors

This function writes data from memory to one or more sectors on the specified drive.


#include <lvm_intr.h>

void _System Write_Sectors (

    CARDINAL32   Drive_Number,       /* (I) Number of the drive to write to (starting from 1) */
    LBA          Starting_Sector,    /* (I) The first sector to write to (starting from 0) */
    CARDINAL32   Sectors_To_Write,   /* (I) The number of sectors to be written */
    ADDRESS      Buffer,             /* (I) Buffer containing the data to write */
    CARDINAL32 * Error               /* (O) Address where the error code will be stored */

);

Parameters

Drive_Number
The number of the hard drive to write to. The drives in the system are numbered from 1 to n, where n is the total number of hard drives in the system.
Starting_Sector
The number of the first sector to write to. The sectors on a drive are numbered starting from 0.
Sectors_To_Write
The number of sectors to be written.
Buffer
The address of the data to be written to disk.
Error_Code
The address of a CARDINAL32 in which to store an error code should an error occur.

Returns

N/A.

Errors

If an error occurs, then the value pointed to by Error will be > 0, and the contents of the specified sectors on disk will be undefined.

Side Effects

Data may be written to disk.

Notes

None.

16-Bit Equivalent:

void _Far16 _Pascal _loadds WRITE_SECTORS16(
        CARDINAL32          Drive_Number,
        LBA                 Starting_Sector,
        CARDINAL32          Sectors_To_Write,
        ADDRESS      _Seg16 Buffer,
        CARDINAL32 * _Seg16 Error
);