[comp.os.msdos.programmer] Installable Device Drivers

reino@cs.eur.nl (Reino de Boer) (02/08/91)

The Context:
A colleague of mine has written an installable device driver for a
network disk. When implementing the read function, he encountered an
ambiguity in the documentation he used (The MS-DOS Encyclopedia).

The Specs:
[quote from the The Encyclopedia] "... Then the functions must return
the number of bytes or sectors actually transferred in the appropriate
field of the request header and also set the done flag in the request
header status word. If an error is encountered during an operation, the
functions must set the done flag, the error flag, and the error type in
the status word and also report the number of bytes successfully
transferred before the error; ..."

The Problem:
When less bytes (sectors) are read than there were requested, and the
device driver does not consider this to be an error, according to the
above specs the driver "...must return the number ... actually
transferred ... and also set the done flag ...". When performing
according to this scheme, MS-DOS thinks that all requested bytes
(sectors) were read.
When, on the other hand, the error flag is also set, MS-DOS thinks there
was an error and responds in the usual "Abort, Retry, ..." manner.

The Question:
How can the device driver convince MS-DOS that there was no error, but
that there were less bytes (sectors) transferred than there were
requested?

Any help (pointers) appreciated -- Reino
-- 
Reino R. A. de Boer     "We want to build the right product right, right?"
Erasmus University Rotterdam ( Informatica )
e-mail: reino@cs.eur.nl