Include:
Prototype: unsigned _dos_read(int handle, void far *buffer,
unsigned count, unsigned *bytes);
Returns: 0 if successful, or DOS error code otherwise.
errno: EBADF, EACCES
See also: _dos_close, _dos_open, _dos_write
The _dos_read routine uses system call 0x3F to read count bytes of data from
the file specified by handle and copy it to the buffer that buffer points
to. The integer that bytes points to will show the number of bytes actually
read, which may be less than the number requested in count. If the number of
bytes actually read is 0, it means the routine tried to read at end-of-file.
----- Note -----
Do not use the DOS interface routines in conjunction with the console, low-
level, or stream I/O routines.
----------------
Return Value
If successful, the function returns 0. Otherwise, it returns the DOS error
code and sets errno to one of the following constants: EBADF, EACCES.