home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / dyndd.zip / dyndd.txt < prev    next >
Text File  |  1998-07-16  |  2KB  |  50 lines

  1.  Dynamic Trace Exit - sample device driver           
  2.  Author: Richard Moore
  3.  Date:    1st December 1997
  4.  Version: 1.0
  5.  
  6.  Sample Dynamic Trace Device Driver Kernel Exit for OS2 Warp v3 
  7.  Fix Pack 35 or later.
  8.  
  9.  This device drive implements a number of functions that are 
  10.  invoked using the CALL DD RPN command follows:
  11.  
  12.  
  13.    push parm1
  14.    ....
  15.    push parmn
  16.    push function
  17.    call dd
  18.  
  19.  The functions implemented are:
  20.  
  21.  0 - log the buffer contents and reset the buffer
  22.  1 - compare two ASCIIZ strings from flat addresses
  23.      The addresses are popped from the RPN stack and
  24.      the result of the compare is pushed. If the
  25.      addresses are equal then the result is 0, if not
  26.      then the result is -1. If an exception occurs then
  27.      a error message is logged and no result is pushed.
  28.  2 - compare two ASCIIZ strings from segmented addresses.
  29.      An offset, then segment of the first comparand is 
  30.      popped from the RPN stack, followed by the offset
  31.      and segment of the 2nd comparand. This functions 
  32.      then proceeds as for function 1.
  33.  3/4 Test device driver fault handler behaviour.
  34.  5 - Get a DWORD global variable. An index (0-15) is popped
  35.      from the RPN stack and the value of the corresponding
  36.      global variable is pushed onto the stack.
  37.  6 - Put a DWORD value into a global variable. An index (0-15) is 
  38.      popped followed by the variable value.
  39.      The corresponding global variable is updated.
  40.      Global variable may be shared across dynamic trace objects,
  41.      unlike local variables, which are local to a DTO.
  42.  
  43.  7 - log the buffer contents skipping the initial 3-byte prefix 
  44.      and reset the buffer. If the buffer contains less than 3 bytes
  45.      then a null record is logged.
  46.  
  47.      See DYNDD.RPN for example of these functions being used.
  48.  
  49.  
  50.