C abswrite() function : C ReferencePritesh
Abswrite() : Write absolute disk sectors in C [dos.h function]
Declaration : abswrite()
int abswrite(int drive,int nsects,long lsect,void *buffer);
- abswrite uses DOS interrupt 0x26 to read specific disk sectors.
- abswrite writes absolute disk sectors
- It ignores the logical structure of a disk and pay no attention to files, FATs, or directories.
- The number of sectors to read is limited to 64K or the size of the buffer, whichever is smaller.
- If used improperly, abswrite can overwrite files, directories, and FATs.
- On success, return 0.
- On error, return -1 and set errno to the value of the AX register returned by the system call.