Dynamic Trace Exit - sample device driver Author: Richard Moore Date: 1st December 1997 Version: 1.0 Sample Dynamic Trace Device Driver Kernel Exit for OS2 Warp v3 Fix Pack 35 or later. This device drive implements a number of functions that are invoked using the CALL DD RPN command follows: push parm1 .... push parmn push function call dd The functions implemented are: 0 - log the buffer contents and reset the buffer 1 - compare two ASCIIZ strings from flat addresses The addresses are popped from the RPN stack and the result of the compare is pushed. If the addresses are equal then the result is 0, if not then the result is -1. If an exception occurs then a error message is logged and no result is pushed. 2 - compare two ASCIIZ strings from segmented addresses. An offset, then segment of the first comparand is popped from the RPN stack, followed by the offset and segment of the 2nd comparand. This functions then proceeds as for function 1. 3/4 Test device driver fault handler behaviour. 5 - Get a DWORD global variable. An index (0-15) is popped from the RPN stack and the value of the corresponding global variable is pushed onto the stack. 6 - Put a DWORD value into a global variable. An index (0-15) is popped followed by the variable value. The corresponding global variable is updated. Global variable may be shared across dynamic trace objects, unlike local variables, which are local to a DTO. 7 - log the buffer contents skipping the initial 3-byte prefix and reset the buffer. If the buffer contains less than 3 bytes then a null record is logged. See DYNDD.RPN for example of these functions being used.