home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 8 / CDASC08.ISO / VRAC / INTSPY10.ZIP / INTSPY.DOC < prev    next >
Encoding:
Text File  |  1993-05-13  |  9.8 KB  |  212 lines

  1. NAME 
  2.      intspy - Monitor interrupts while running a program.
  3.  
  4. SYNOPSIS 
  5.      intspy [-setup] logfile command [parameters]
  6.  
  7. DESCRIPTION 
  8.      Intspy runs command with optional parameters, logging
  9.      interrupts to logfile. Which interrupts have to be
  10.      monitored, and what has to be logged is defined in the
  11.      file intspy.ini. This file is searched for, in the
  12.      current directory. Next all directories included in the
  13.      PATH environment variable are searched. The format of
  14.      intspy.ini is the standard Windows ini file format.
  15.  
  16.      The interrupts to be monitored are specified in the
  17.      section [intspy.setup], or in [intspy.default] if setup
  18.      is not specified at the command line. The lines in
  19.      [intspy.setup] or [intspy.default] look like:
  20.  
  21.           intno = descriptionsection
  22.  
  23.      Intno is a hexadecimal number defining the interrupt to
  24.      be monitored. Descriptionsection is a string defining the
  25.      section in which pairs of masks and descriptions are
  26.      defined. Descriptionsection defaults to default.
  27.  
  28.      If setup is a hexadecimal integer, the contents of
  29.      [intspy.setup] default to:
  30.  
  31.           setup = default
  32.  
  33.      Otherwise an error message is generated when
  34.      [intspy.setup] is empty.
  35.  
  36.      The lines in [descriptionsection] or [default] look like:
  37.  
  38.           mask = format [, var1 [, var2 ...]]
  39.  
  40.      If interrupt intno occurs, mask is compared with the
  41.      contents of the registers AH, AL, BH, BL, CH, CL, DH and
  42.      DL. If mask matches the register contents, a message
  43.      defined by format, var1, var2, etc. is written to
  44.      logfile. Only the message defined by the first matching 
  45.      mask is written. The first matching mask is the one which
  46.      occurs first in the intspy.ini file.
  47.  
  48.      Mask contains 1 to 8 pairs of hexadecimal digits or the
  49.      wildcard ??. The pairs are compared with the registers in
  50.      the following order, AH, AL, BH, BL, CH, CL, DH and DL.
  51.      Missing pairs are assumed to be wildcards.
  52.  
  53.      Format is a double quoted string confirming to the syntax
  54.      of the C programming language, containing conversion
  55.      specifications like the format string of printf().
  56.  
  57.      Var1, var2, etc. are pseudo variables. Next is a list of
  58.      possible pseudo variables, together with the values they
  59.      represent:
  60.           ax   The contents of the AX register when the
  61.                interrupt was generated.
  62.           ah   The contents of the AH register when the
  63.                interrupt was generated.
  64.           al   The contents of the AL register when the
  65.                interrupt was generated.
  66.           bx   The contents of the BX register when the
  67.                interrupt was generated.
  68.           bh   The contents of the BH register when the
  69.                interrupt was generated.
  70.           bl   The contents of the BL register when the
  71.                interrupt was generated.
  72.           cx   The contents of the CX register when the
  73.                interrupt was generated.
  74.           ch   The contents of the CH register when the
  75.                interrupt was generated.
  76.           cl   The contents of the CL register when the
  77.                interrupt was generated.
  78.           dx   The contents of the DX register when the
  79.                interrupt was generated.
  80.           dh   The contents of the DH register when the
  81.                interrupt was generated.
  82.           dl   The contents of the DL register when the
  83.                interrupt was generated.
  84.           ds   The contents of the DS register when the
  85.                interrupt was generated.
  86.           es   The contents of the ES register when the
  87.                interrupt was generated.
  88.           cs   The contents of the CS register when the
  89.                interrupt was generated.
  90.           ss   The contents of the SS register when the
  91.                interrupt was generated.
  92.           di   The contents of the DI register when the
  93.                interrupt was generated.
  94.           si   The contents of the SI register when the
  95.                interrupt was generated.
  96.           bp   The contents of the BP register when the
  97.                interrupt was generated.
  98.           sp   The contents of the SP register when the
  99.                interrupt was generated.
  100.           ip   The contents of the IP register when the
  101.                interrupt was generated.
  102.           flags
  103.                The contents of the flags register when the
  104.                interrupt was generated.
  105.           dsax A pointer to a copy of the string pointed to
  106.                by DS:AX. This copy is truncated, and all non
  107.                printable characters are replaced.
  108.           dsbx A pointer to a copy of the string pointed to
  109.                by DS:BX. This copy is truncated, and all non
  110.                printable characters are replaced.
  111.           dscx A pointer to a copy of the string pointed to
  112.                by DS:CX. This copy is truncated, and all non
  113.                printable characters are replaced.
  114.           dsdx A pointer to a copy of the string pointed to
  115.                by DS:DX. This copy is truncated, and all non
  116.                printable characters are replaced.
  117.           dsdi A pointer to a copy of the string pointed to
  118.                by DS:DI. This copy is truncated, and all non
  119.                printable characters are replaced.
  120.           dssi A pointer to a copy of the string pointed to
  121.                by DS:SI. This copy is truncated, and all non
  122.                printable characters are replaced.
  123.           esax A pointer to a copy of the string pointed to
  124.                by ES:AX. This copy is truncated, and all non
  125.                printable characters are replaced.
  126.           esbx A pointer to a copy of the string pointed to
  127.                by ES:BX. This copy is truncated, and all non
  128.                printable characters are replaced.
  129.           escx A pointer to a copy of the string pointed to
  130.                by ES:CX. This copy is truncated, and all non
  131.                printable characters are replaced.
  132.           esdx A pointer to a copy of the string pointed to
  133.                by ES:DX. This copy is truncated, and all non
  134.                printable characters are replaced.
  135.           esdi A pointer to a copy of the string pointed to
  136.                by ES:DI. This copy is truncated, and all non
  137.                printable characters are replaced.
  138.           essi A pointer to a copy of the string pointed to
  139.                by ES:SI. This copy is truncated, and all non
  140.                printable characters are replaced.
  141.           csax A pointer to a copy of the string pointed to
  142.                by CS:AX. This copy is truncated, and all non
  143.                printable characters are replaced.
  144.           csbx A pointer to a copy of the string pointed to
  145.                by CS:BX. This copy is truncated, and all non
  146.                printable characters are replaced.
  147.           cscx A pointer to a copy of the string pointed to
  148.                by CS:CX. This copy is truncated, and all non
  149.                printable characters are replaced.
  150.           csdx A pointer to a copy of the string pointed to
  151.                by CS:DX. This copy is truncated, and all non
  152.                printable characters are replaced.
  153.           csdi A pointer to a copy of the string pointed to
  154.                by CS:DI. This copy is truncated, and all non
  155.                printable characters are replaced.
  156.           cssi A pointer to a copy of the string pointed to
  157.                by CS:SI. This copy is truncated, and all non
  158.                printable characters are replaced.
  159.           ssax A pointer to a copy of the string pointed to
  160.                by SS:AX. This copy is truncated, and all non
  161.                printable characters are replaced.
  162.           ssbx A pointer to a copy of the string pointed to
  163.                by SS:BX. This copy is truncated, and all non
  164.                printable characters are replaced.
  165.           sscx A pointer to a copy of the string pointed to
  166.                by SS:CX. This copy is truncated, and all non
  167.                printable characters are replaced.
  168.           ssdx A pointer to a copy of the string pointed to
  169.                by SS:DX. This copy is truncated, and all non
  170.                printable characters are replaced.
  171.           ssdi A pointer to a copy of the string pointed to
  172.                by SS:DI. This copy is truncated, and all non
  173.                printable characters are replaced.
  174.           sssi A pointer to a copy of the string pointed to
  175.                by SS:SI. This copy is truncated, and all non
  176.                printable characters are replaced.
  177.           intno
  178.                The number of the interrupt.
  179.  
  180. BUGS
  181.      For interrupt handlers, it is at some instances not
  182.      allowed to write to a file. In this case logging messages
  183.      are buffered, and written upon a later interrupt. If the
  184.      buffer overflows, all messages in the buffer are
  185.      discarded, and an error message is written to the logging
  186.      file. If this happens, it is a good idea to monitor also
  187.      an interrupt which occurs often, and have an empty string
  188.      to be written on this interrupt. This causes the buffer
  189.      to be flushed regularly.
  190.  
  191.      Intspy uses the C function spawnvp() to execute command.
  192.      The interrupts generated by this call are logged too.
  193.  
  194.      When running a program in a Windows DOS box, some
  195.      interrupts are eaten by Windows, and never reach intspy.
  196.  
  197.      Some programs install their own interrupt handler. This
  198.      could mean that the interrupt monitor of intspy is
  199.      replaced by the programs interrupt handler, so nothing is
  200.      logged.
  201.  
  202.      Some interrupt vectors are no real interrupt vectors, but
  203.      are used as a storage location for something. Installing
  204.      an interrupt monitor for the corresponding interrupt may
  205.      cause unexpected results.
  206.  
  207. VERSION
  208.      1.0
  209.  
  210. COPYRIGHT 
  211.      (C) 1993 F.Wiarda
  212.