home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR2 / CRIT131A.ZIP / CRITTER.TXT < prev   
Text File  |  1993-10-22  |  23KB  |  528 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.                                   CRITTER
  12.  
  13.                   A TSR replacement Critical Error Handler
  14.  
  15.                   Copyright 1990-1992 by TANSTAAFL Software
  16.  
  17.              Version 1.31 October 13, 1992
  18.  
  19.  
  20.  
  21.  
  22.  
  23.     CRITTER is a full-featured replacement for the DOS critical error
  24.     handler.  CRITTER uses a pop-up window that does not change the
  25.     displayed program, and provides many options that DOS does not
  26.     have.  All errors can be logged to a printer.  CRITTER can use
  27.     automatic responses to an error, with a variable time delay. With
  28.     this version of CRITTER, a "response pattern" can be used to behave
  29.     in a predictable manner, such as "retry three times then fail".
  30.  
  31.     CRITTER was originally written to handle normal critical errors
  32.     with more aplomb than DOS.  It seemed that most programs back then
  33.     did not have their own critical error handlers, so any error would
  34.     ruin some of the application's display.  To this day, many
  35.     commercial applications ignore critical errors.
  36.  
  37.     According to user feedback, CRITTER really shines on systems
  38.     that are unattended.  Several users use CRITTER on their bulletin
  39.     board systems to ensure round-the-clock operations.  One user has
  40.     CRITTER running on a remote packet radio repeater.  Another user
  41.     has integrated CRITTER into a robotic manufacturing system.
  42.  
  43.     CRITTER should be installed in your autoexec.bat file, so it
  44.     can be loaded every time you boot the system.  CRITTER is not
  45.     sensitive to the order in which it is loaded with other TSR's, so
  46.     can be placed anywhere in the autoexec.bat file.
  47.  
  48.  
  49.     Command Line Options
  50.     --------------------
  51.  
  52.     CRITTER     [/U] [/M] [/S] [/Bcolors] [/Tcolors] [/Ncolors]
  53.                 [/Aresponse] [/Otimeout] [/Lprinter] [/Rresponses]
  54.                 [/Etimeticks]
  55.  
  56.         Regular Options:
  57.  
  58.         /U      Unloads the TSR.  Like all TSR's that allow themselves
  59.                 to be unloaded, this feature only works if this TSR was
  60.                 the last one loaded.  This TSR will unload correctly
  61.                 from high DOS RAM (above 640K).
  62.  
  63.         /M      Monochrome switch.  Allows correct display on systems
  64.                 with monochrome monitors connected to color display
  65.                 adapters.
  66.  
  67.         /S      Sound switch.  Turns off the beep when an error is
  68.                 detected.  Normally a beep is generated to signal
  69.                 an error.
  70.  
  71.         /B      Used to set border colors (see Color Options).
  72.  
  73.         /T      Used to set title colors (see Color Options).
  74.  
  75.         /N      Used to set normal text colors (see Color Options).
  76.  
  77.  
  78.         Advanced Options:
  79.  
  80.         /A      Enables automatic response to an error (see Automatic
  81.                 Response).  Response can be one of the following:
  82.  
  83.                 Response Action         Response Action
  84.                 ---------------         ---------------
  85.  
  86.                 A        Abort          R        Retry
  87.                 I        Ignore         F        Fail
  88.                 S        Soft reboot    H        Hard reboot
  89.  
  90.         /O      Allows user to specify the number of seconds to wait
  91.                 for a user response before triggering the automatic
  92.                 response specified by the /A option (see Automatic
  93.                 Response).
  94.  
  95.         /L      Printer log.  Allows user to specify a printer
  96.                 number to log errors to.  Valid printer numbers are 1, 2,
  97.                 or 3 and correspond to printers on LPT1, LPT2, or LPT3.
  98.  
  99.         /R      Response pattern.  Allows the user to specify a pattern
  100.                 of responses.  The normal response characters
  101.                 (A, R, I, F, S, H) can be used (see Response Patterns).
  102.  
  103.         /E      Error timer ticks.  Allows the user to specify how many
  104.                 timer ticks should pass between errors before the
  105.                 response pattern starts over (see Response Patterns).
  106.         Color Options
  107.         -------------
  108.  
  109.         Each color command is followed by characters that determine the
  110.         color to use.  Each color is designated by a single character, as
  111.         shown in the chart below.  If the character is in upper case,
  112.         it sets the background color.  A lower case character sets the
  113.         foreground color.  Adding a [+] to the string makes the fore-
  114.         ground color bright, while adding a [*] makes it blink.  Color
  115.         commands may be used in any order.
  116.  
  117.         Color           Character       Color           Character
  118.         ---------------------------------------------------------
  119.         Black           K, k            Blue            B, b
  120.         Green           G, g            Cyan            C, c
  121.         Red             R, r            Magenta         M, m
  122.         Yellow          Y, y            White           W, w
  123.         Bright          +               Blink           *
  124.  
  125.         Examples:
  126.  
  127.         /bwK            border is dim white on black
  128.         /ty+*R          title is blinking bright yellow on red
  129.         /ncB            text is cyan on blue
  130.  
  131.  
  132.         Automatic Response
  133.         ------------------
  134.  
  135.         The automatic response feature allows the user to specify a
  136.         default action and timeout duration.  If a critical error occurs
  137.         and the timeout value is specified, CRITTER shows the error
  138.         window and waits for a key to be pressed as usual (A-abort,
  139.         R-retry, etc).  The window will now contain an extra countdown
  140.         timer line.  If the user does not respond before this count
  141.         reaches zero, then the automatic response is triggered.  All
  142.         four possible responses to the error are supported (Abort, Retry,
  143.         Ignore, and Fail).  Not all errors support all responses, however,
  144.         Abort is always enabled, as is Fail on DOS versions 3.x, 4.x & 5.x.
  145.         Retry also appears to be always enabled.
  146.  
  147.         If the automatic response is enabled but the delay is not,
  148.         no error screen will be displayed and the response will take
  149.         place immediately.
  150.  
  151.         The automatic response unit can also reboot the computer as a
  152.         default response.  Either a hard (reset) or soft (Ctrl-Alt-Del)
  153.         reboot can be triggered.  This is useful for network or BBS
  154.         systems that must run unattended.
  155.  
  156.         The soft reboot feature does not work consistently on some PCs.
  157.         This seems to be caused by minor BIOS incompatibilities.  Before
  158.         relying on a soft reboot, test it once to ensure it works on
  159.         your computer.
  160.  
  161.         Examples:
  162.  
  163.         /af /o10        Wait 10 seconds for response, then fail.
  164.         /ar /o30        Wait 30 seconds for response, then retry.
  165.  
  166.         Printer Logging
  167.         ---------------
  168.  
  169.         With the printer logging feature, errors detected by CRITTER may
  170.         be logged to your printer.  This is particularly handy when used
  171.         in conjunction with the automatic response feature.  The error log
  172.         contains the same three error lines displayed when CRITTER pops up,
  173.         preceded by a header line and followed by a blank line...
  174.  
  175.             Critical Error Report from CRITTER follows:
  176.             Drive not ready
  177.             Read error on Drive A:
  178.             Located in File Allocation Table
  179.  
  180.         CRITTER only supports parallel printers.  If you have a serial
  181.         printer, try using the MODE command to route it to LPT1.  If
  182.         you try this, let us know the results.
  183.  
  184.  
  185.         Response Patterns
  186.         -----------------
  187.  
  188.         Response patterns were designed for the user who wants to retry
  189.         a fixed number of times and then do something else.  This feature
  190.         allows the user to specify up to 16 responses for an error.  Any
  191.         of the normal responses may be used.  A timeout duration (/O)
  192.         may be specified to allow a user to break out of the pattern.
  193.  
  194.         How does CRITTER know that the error it just got is the same
  195.         error it just retried?  CRITTER saves the registers describing
  196.         the error.  If CRITTER gets an error that is the same as the
  197.         previous error AND not much time has passed, it assumes that
  198.         it is the same error.  How much time has to pass before the
  199.         error is considered a different error?  The error timer ticks
  200.         option (/E) allows the user to specify how many timer ticks must
  201.         elapse (at 18.2 per second) before the error is treated as a
  202.         different error.  When some errors are retried, they may take a
  203.         long time before returning as an error.  This is particularly
  204.         prevalent with network errors, where a retry may take more than
  205.         several seconds to fail again.  The default error timer ticks is
  206.         set at 18 (1 second).  If your system behaves unusually, try
  207.         changing this value.
  208.  
  209.         The /R and /A commands may be used together.  If an error
  210.         cycles all the way through the response pattern, then the
  211.         /A response is used.
  212.  
  213.         Examples:
  214.  
  215.         /rrrrf /o10     Retry 3 times, then fail, with 10-second wait
  216.                         between each response.
  217.         /rrh /o5 /e100  Retry once, then perform a hard reboot.  Wait 5
  218.                         seconds before each, and allow five seconds
  219.                         for the retry to fail.
  220.         /rrfa           Retry once, then fail.  If the error comes
  221.                         back again after the fail, then abort.
  222.     Critical Error Handler Theory
  223.     -----------------------------
  224.  
  225.         Critical errors are caused by hardware errors, generally in disk
  226.         drives.  These errors may be minor (such as printer out of paper,
  227.         or drive door open) or fairly catastrophic (like a scrambled FAT
  228.         or dead hard disk).  A critical error can be caused by virtually
  229.         any DOS call EXCEPT interrupts 25h and 26h (Absolute Disk Read &
  230.         Write).  A critical error is associated with a device and can be
  231.         either a block device (disk drives) or a character device
  232.         (printer, keyboard, clock, etc.).  Each time the error handler
  233.         is called, parameters are passed that indicate which error
  234.         occurred and where it happened.
  235.  
  236.         The DOS critical error handler is entered via software interrupt
  237.         24.  DOS will allow a program to replace the DOS critical error
  238.         handler with its own, but only for the duration of program
  239.         execution.  When the program exits, DOS replaces the address of
  240.         the program's handler, routing all further critical errors to DOS.
  241.         CRITTER patches the resident portion of COMMAND.COM so that
  242.         CRITTER has control of critical errors.  The disk file COMMAND.COM
  243.         is NOT changed.  Due to the unusual way DOS handles INT 24,
  244.         CRITTER can only be unloaded with the /U command line option.  If
  245.         a TSR manager is used (such as MARK and RELEASE), the resident
  246.         portion of COMMAND.COM will not be "unpatched" and the next
  247.         critical error will cause the computer to loop until reset.
  248.         
  249.         The CRITTER critical error handler gives the following
  250.         information:
  251.  
  252.                 Error (DOS)     Write protected disk
  253.                                 Unknown unit
  254.                                 Drive not ready
  255.                                 Unknown command
  256.                                 CRC error in data
  257.                                 Bad drive request
  258.                                 Seek error
  259.                                 Unknown media type
  260.                                 Sector not found
  261.                                 Printer out of paper
  262.                                 Write fault
  263.                                 Read fault
  264.                                 General failure
  265.                                 Sharing violation
  266.                                 Lock violation
  267.                                 Invalid disk change
  268.                                 FCB unavailable
  269.                                 Sharing buffer overflow
  270.  
  271.                 Error (Network) Network busy
  272.                                 Network device no longer exists
  273.                                 NetBIOS command limit exceeded
  274.                                 Network adapter hardware error
  275.                                 Incorrect response from network
  276.                                 Incompatible remote adapter
  277.                                 Print queue full
  278.                                 Not enough space for print file
  279.                                 Print file was deleted
  280.                                 Network name was deleted
  281.                 Error Cause     Read operation
  282.                                 Write operation
  283.  
  284.                 Error Location  System area
  285.                                 File Allocation Table
  286.                                 Directory
  287.                                 Data area
  288.                                 Internal copy of FAT
  289.  
  290.                 Other Info      (char)  Device name
  291.                                 (block) Drive designator
  292.  
  293.         Possible responses to a critical error are Abort, Ignore, Retry,
  294.         or Fail.  Not all responses are possible at all times -- it
  295.         depends on the error and the version of DOS.  The CRITTER software
  296.         enables only those responses that DOS will allow at the time.
  297.  
  298.     Test Results
  299.     ------------
  300.  
  301.         CRITTER has been tested with various DOS versions from 2.1
  302.         through 5.00.  It was tested with various programs and found to
  303.         allow the tested program to install its own error handler for the
  304.         duration of its execution.  Upon return to DOS, CRITTER continued
  305.         to handle errors correctly.  For those text mode programs that
  306.         don't install their own error handlers, CRITTER takes care of it
  307.         for them.
  308.  
  309.         Unfortunately, CRITTER is hard to test completely.  Several
  310.         easy errors can be generated, including the write protect
  311.         error, the drive not ready error, the paper out error, and the
  312.         read & write faults.  Other errors could be tested if they were
  313.         physically produced, such as unplugging the clock chip or
  314.         crashing the hard disk (not recommended).
  315.  
  316.         CRITTER can be loaded high with the loadhigh command under DOS 5,
  317.         or by using similar commands for 386MAX or QEMM.
  318.  
  319.         CRITTER does not work in the DOS compatibility box under OS/2.
  320.  
  321.         In the event that the display is in graphics mode, CRITTER will
  322.         use the DOS handler.  This may result in the screen being
  323.         scrolled.  Fortunately, most programs that use graphics modes
  324.         contain their own critical error handlers.
  325.  
  326.     Files In This Archive Include:
  327.     ------------------------------
  328.  
  329.         critter.txt     (this file)
  330.         critter.exe     CRITTER program
  331.  
  332.     Future Enhancements
  333.     -------------------
  334.  
  335.         No future enhancements to CRITTER are planned.  If you desire
  336.         a new feature, please contact the authors.  All features since
  337.         version 1.00 are the result of user requests.  This version of
  338.         CRITTER is sufficient for our needs.
  339.  
  340.         All users are invited to suggest enhancements.  Please contact
  341.         the authors at the communications addresses on the next page
  342.  
  343.     Terms And Conditions
  344.     --------------------
  345.  
  346.         You may use this software freely in any non-military environment.
  347.         You may distribute this software freely as long as the archive
  348.     file contains all of the files mentioned above.  The shareware
  349.     version requires that a key be pressed before Critter completes
  350.     the loading process.  The standard registered version has no
  351.     such requirement and loads without receiving a keystroke.  In
  352.     addition, the message about an "unregistered version" is removed.
  353.  
  354.         The following purchasing terms are available:
  355.  
  356.         Standard Registration                                   $ 20
  357.         Latest version, disk size of your choice.
  358.  
  359.         Shareware Distribution License                          $100
  360.         Special version for shareware authors wishing to
  361.         distribute CRITTER with their products.  Allows
  362.         unlimited distribution.
  363.  
  364.         Source Code in C and Assembler                          $200 *
  365.         Includes unusual design tricks and well-commented
  366.         source code.
  367.  
  368.         Commercial Distribution License                         $300 *
  369.         Special version for authors of commercial software,
  370.         allows unlimited distribution.  Includes source code.
  371.  
  372.         And of course, if your shipping address is in Colorado,
  373.         include sales tax (currently 6.3% if you're in 
  374.         Lakewood, 4.3% in Jefferson County, 3.8% in the
  375.         Denver Metro area, or 3% elsewhere). (whew!)
  376.  
  377.         If you desire a site license or are a special interest
  378.         group, please contact the authors.
  379.  
  380.     * Microsoft C v7.0 and the Microsoft Macro Assembler v5.1
  381.           are required to assemble and/or compile the source.
  382.     Communications
  383.     --------------
  384.  
  385.         We may be reached by the following methods for feedback:
  386.  
  387.         on GENIE        TANSTAAFL              (Dana Cline)
  388.  
  389.         on INTERNET     dcline@isis.cs.du.edu  (Dana Cline)
  390.  
  391.         on CompuServe   74606,525              (Dean McCrory)
  392.                         73700,3053             (Dana Cline)
  393.  
  394.         by phone        (303) 989-7389 After 8 AM and before
  395.                         10 PM MST (Thanks!).  I do have an
  396.                         answering machine, which has an unlimited
  397.                         message length.  I am generally not in
  398.                         during the day (I have to work, too).
  399.  
  400.         by mail         Dana W. Cline  
  401.                         TANSTAAFL Software
  402.                         P. O. Box 260075
  403.                         Lakewood, CO  80226
  404.  
  405.         Feedback of all types is appreciated.
  406.  
  407.     Disclaimer
  408.     ----------
  409.  
  410.         The authors claim no responsibility for any damage caused by the
  411.         use or misuse of this product.  This product is distributed "as is"
  412.         with no warranty expressed or implied.  The authors will not be
  413.         responsible for any losses incurred, either directly or indirectly,
  414.         by the use or misuse of this product.  The authors reserve the
  415.         right to make modifications at any time.  Prices are subject to
  416.         change without notice.
  417.  
  418.     Thanks to:
  419.     ----------
  420.  
  421.         Dean McCrory, for making CRITTER go TSR!
  422.         Holly Miller, for much help on the original manual.
  423.         Judy Wolff, for much help on this manual.
  424.         Floyd Pretz, for suggesting the automatic response feature.
  425.         Rob Cosgrove, for suggesting the response pattern feature.
  426.         Jerry Pournelle, for continually harping about the drawbacks
  427.             of MS-DOS.
  428.  
  429.     Information Sources:
  430.     --------------------
  431.  
  432.         MS-DOS Programmer's Reference, from Microsoft Press
  433.         MS-DOS Developer's Guide, from the Waite Group
  434.         Microsoft C 5.1 Manual, from Microsoft
  435.         MS-DOS Functions, from Microsoft Press
  436.  
  437.     Trademarks
  438.     ----------
  439.  
  440.         Because of the nature of this manual, numerous software products are
  441.         mentioned by their trade names.  In most, if not all, cases these
  442.         designations are claimed as trademarks by the respective companies.
  443.         CRITTER is not a registered trademark, but, hey, we did use it first.
  444.                                   Order Form
  445.                               TANSTAAFL Software
  446.  
  447.  
  448.         NAME:     ______________________________________________________
  449.  
  450.         COMPANY:  ______________________________________________________
  451.  
  452.         ADDRESS:  ______________________________________________________
  453.  
  454.                   ______________________________________________________
  455.  
  456.         CITY:     ______________________________________________________
  457.  
  458.         STATE:    ________________________  ZIP CODE:  _________________
  459.  
  460.         PHONE:    ______________________________________________________
  461.  
  462.         E-MAIL ADDRESS:  _______________________________________________
  463.  
  464.         WHERE DID YOU RECEIVE CRITTER?  ________________________________
  465.  
  466.         ________________________________________________________________
  467.  
  468.         DISK SIZE NEEDED: [  ] 3-1/2      [  ] 5-1/4
  469.  
  470.         COMMENTS:  _____________________________________________________
  471.  
  472.         ________________________________________________________________
  473.  
  474.         ________________________________________________________________
  475.  
  476.         Basic Registration              @ $ 20.00             __________
  477.  
  478.         Shareware Distribution License  @ $100.00             __________
  479.  
  480.         Source Code in C and Assembler  @ $200.00             __________
  481.  
  482.         Commercial Distribution License @ $300.00             __________
  483.  
  484.         Colorado sales tax              (see rates above)     __________
  485.  
  486.         Non-US Shipping @ $5.00                               __________
  487.             (Payments must be in US Dollars, US bank)
  488.  
  489.                                                     TOTAL:   $__________
  490.  
  491.         Checks or money orders only.  Sorry, no company
  492.         P.O.'s or credit cards.
  493.  
  494.         Remit to:         Dana W. Cline
  495.                           TANSTAAFL Software
  496.                           P.O. Box 260075
  497.                           Lakewood, CO  80226
  498.         CRITTER Version History
  499.         ---------------
  500.  
  501.         Version         Date            Features / Bug Fixes
  502.         ----------------------------------------------------
  503.  
  504.         1.00            04/26/90        Original release.
  505.  
  506.         1.10            05/11/90        Automatic response and
  507.                                         timeout feature added.
  508.  
  509.         1.20            07/20/91        Printer logging. Reduce resident
  510.                                         size by about 700 bytes.  Use C6
  511.                                         compiler.
  512.  
  513.     1.30        03/26/92    Added response patterns.
  514.  
  515.     1.31        10/13/92    Removed expiration date.  Added
  516.                     keystroke requirement to
  517.                     unregistered verson.  No new
  518.                     features added to the registered
  519.                     version. C7 is now required to
  520.                     compile the source.
  521.  
  522.         1.31a           10/22/93        Removed "Press a key" prompt to
  523.                                         complete the loading process.
  524.                                         This allows BBS operators and
  525.                                         others to fully test Critter
  526.                                         during true 'unattended'
  527.                                         operations.
  528.