[4592] in comp.os.os2.announce archive

home help back first fref pref prev next nref lref last post

KD - an OS/2 Driver to execute application specified code sequences in Kernel Mode

daemon@ATHENA.MIT.EDU (mdivya)
Thu Mar 11 18:47:27 1999

To: os2ann.DISCUSS@bloom-picayune.mit.edu
Date: Thu, 11 Mar 1999 10:50:57 GMT
From: "mdivya" <mdivya@mci2000.com>

>>> sorry, if this is a duplicate posting <<<


KD -  an OS/2 Driver to execute application specified code sequences in
Kernel Mode


Under OS/2, when dealing with unsupported hardware (eg: data acquisition
cards), applications can use TESTCFG.SYS to perform direct I/O.  However,
there may be cases where the hardware may require a sequence of I/O
instructions rather than just a single IN or OUT.

KD is an OS/2 Driver that executes a user specified code sequence in Kernel
Mode.

An example sequence might be as follows:

     mov dx,240h
     in al,dx
     or al,80h
     out dx,al
     ret

An application can handle this sequence by using TESTCFG.SYS (search in
http://www.edm2.com ).  However, if the sequence is somewhat time critical
(between the two I/O), then KD can be used to execute the sequence.


The application passes the assembled code as data and KD uses an Intel Code
Interpreter to execute the code sequence.   The code sequence can be
assembled and can be copied to data area (either manually or embedded into
the program itself)  and then passed to KD via a DosDevIOCtl.    To keep it
simple a very restricted opcode subset is supported.





WARNING:  use with extreme caution; may cause system crash
UNTESTED SOFTWARE -  USE AT YOUR OWN RISK



home help back first fref pref prev next nref lref last post