[net.micro.pc] Loadable Device Drivers

b-davis%utah-cs@sri-unix.UUCP (11/24/83)

From:  b-davis@utah-cs (Brad Davis)

I have been working on a device driver for a char device (a serial
port plotter) in such a way that the driver knows the format of the
plotter commands but the application program doesn't.  I set up a char
device and sent 20 bytes to it in one buffer with the int 21h ah = 40h
function call.  In poking around in the driver I found that DOS was
calling my routine once for every byte I was sending.  Since I send
down one buffer of 20 bytes is there some way to make DOS do one call
to my driver and write all 20 bytes at the same time?  I think I could
make the driver a blocked device but that sort of defeats the idea of
having char devices.  I would also be interested in hearing from any
others who have written device drivers.

By the way, the reason that the NUL device can't be replaced is that
DOS points at it first and loads the other drivers after it.  If you
load two drivers with the same name then the last one loaded is first
in the list and will get invoked.  The hard and floppy disk are under
the same driver.


Brad Davis
b-davis@utah-cs