[comp.os.msdos.programmer] communication with resident program

ahegde@mipos2.intel.com (10/13/90)

> From: gday@digigw.digital.co.jp (Gordon Day)
> Subject: Communicating With Resident Programs

>  Could somebody suggest the best way to communicate with a driver?  I have 
>  successfully implemented a block device driver, but I am at a loss as to the
>  best way to communicate with it from a transient program.  I have come up 
>  with three ideas, both with advantages and disadvantages:

> 1. Search through available user interrupts (0x61 - 0x67) for a free one and
> use that.

> 2. Use Multiplex Interrupt (0x2f) 

> 3. Chain through device headers searching for signature


	You can mainly two types of drivers, instalable, and others. 
3. looks like the installable option (the one that can be specified in
config.sys as DEVICE = xxxx.sys)

	If you have installable driver, you can communicate with it as
you do with any other device. (it is possible to 'open' a PRN device
for writing, CON device for read/write, etc) and the communication
proceeds in the standard DOS way. You may have your own protocol for
sending control information along with data, though this can become
a non-standard feature. 

	On the other hand, if you make it resident by attaching it
with any software interrupts, you can have any arbitrary way of sending
data/control info to it without sticking to standard procedure. Of
course there is always a possibility of all user interrupts being taken
up. Then you will have to overwrite one of them depending on which is
less important. The same will be the case with 2Fh multiplex intr. too.

	If you are for standard things, i don't see you have a choice
there, other than making it a typical dos device driver. On the other 
hand, between choices 1 and 2, i don't see any difference. 

anoop hegde		ahegde@mipos2.intel.com