home *** CD-ROM | disk | FTP | other *** search
/ Phoenix CD 2.0 / Phoenix_CD.cdr / 02a / nmi11.zip / NMI.DOC < prev   
Text File  |  1985-03-15  |  10KB  |  236 lines

  1.                           NMI (Non-Maskable Interrupt)
  2.  
  3.  
  4.  
  5.  
  6.  
  7.        Have you ever seen the message 'PARITY CHECK' on your display?  If
  8.     you have, you've probably noticed that it always seems to happen at the
  9.     most inopportune time.  You're cruising along putting the finishing
  10.     touches on something that you've worked long and hard, just to look up
  11.     from the keyboard to a blank display with only the words 'PARITY CHECK'
  12.     in the upper left corner.  Your heart sinks into your shoes, your face
  13.     gets flush, and palms begin to sweat, as you try franticly to figure a
  14.     way out of this one... but you KNOW that you've lost everything!  Your
  15.     only option is to power off and start over.
  16.  
  17.        The IBM-PC is a great machine, and parity checking is a wonderful
  18.     concept, but I've always wished that I had been given a choice before
  19.     the machine was put to sleep.  Even more, I've wished that somehow the
  20.     machine could have told me where it hurts before it died.  I've never
  21.     gotten much of anything by wishing, so I sat down to attempt to remedy
  22.     the situation.
  23.  
  24.        NMI is a resident program to replace the non-maskable interrupt
  25.     handler that the PC uses to handle parity errors.  In the event of a
  26.     parity error, NMI will interrupt the currently executing program(s) and
  27.     begin testing memory, looking for the error.  It will continue testing
  28.     until either it locates a failing address, or you interrupt it by
  29.     pressing a key.  If a failure is located, NMI will display the failing
  30.     64K bank, exact memory address, and bit(s).  You have the option to
  31.     continue or terminate testing.  If you interrupt the memory test, or
  32.     elect not to continue testing after an error is detected, you are given
  33.     the options to return to the interrupted program(s) with or without
  34.     parity checking enabled, or to reboot the system.
  35.  
  36.        The memory test is of a non-destructive type, in that it will
  37.     preserve the current contents of memory.  It can be executed any time
  38.     without regard for concurrently executing processes.  It's also a very
  39.     thorough test, reading and writing each byte of memory with several
  40.     different bit patterns and checking for parity errors following each
  41.     read or write operation.  Every memory location is tested, including
  42.     the locations used by NMI.
  43.  
  44.        This all sounds a bit like insurance doesn't it?  It doesn't do you
  45.     a bit of good unless you have a tragedy on your hands.  Well, I like
  46.     programs that you can play with, and since you've got this neat little
  47.     memory test just sitting there in memory, why not be able to use it?
  48.     NMI will execute the memory test any time you like, as many times as
  49.     you like!
  50.  
  51.        If you're like me (a memory miser), the question in your mind right
  52.     now is... 'Just how much memory does this thing eat?'.  The answer,
  53.     approximately 1.6K including the Program Segment Prefix and a normal
  54.     size environment.  In English, that means about 1.6K TOTAL!  Even I can
  55.     afford that.
  56.  
  57.                           NMI (Non-Maskable Interrupt)
  58.  
  59.  
  60.  
  61.  
  62.  
  63.     PROGRAM LOADING
  64.     ---------------
  65.  
  66.        NMI /N/I/T####
  67.             | | |
  68.             | | Test memory #### times.
  69.             | |
  70.             | |   If the number of test repetitions is 0 or blank, then the
  71.             | | memory test loops indefinitely until an error is detected
  72.             | | or you interrupt it by pressing a key.  This option may be
  73.             | | used to invoke the memory test from the command line or a
  74.             | | batch file.  NMI need not be installed to run the memory
  75.             | | test.
  76.             | |
  77.             | Install NMI.
  78.             |
  79.             |   This option must be selected the first time NMI is executed
  80.             | if you desire to replace the current non-maskable interrupt
  81.             | handler.  It need not, and should not be specified again.  |
  82.             |
  83.             No program logo display.
  84.  
  85.               This option is selected to suppress display of the program
  86.             logo when NMI is installed.
  87.  
  88.  
  89.     *  If no parameters are specified, or the specified parameters are
  90.        invalid, NMI will display the program logo followed by a summary of
  91.        valid parameters.
  92.  
  93.     *  Parameters need not be separated, however, they may be separated by
  94.        one or more spaces, tabs, commas, slashes, or semi-colons.
  95.  
  96.     *  Alphabetic parameters may be upper or lower case.
  97.  
  98.     *  Parameters may be entered in any order or combination so long as the
  99.        number of test repetitions follows the 'T' parameter and they are
  100.        not separated by another parameter.
  101.  
  102.                           NMI (Non-Maskable Interrupt)
  103.  
  104.  
  105.  
  106.  
  107.  
  108.     ++++++++++++++++++++++++++++
  109.     +   TESTING ####K MEMORY   +
  110.     + Bank    Bit     Address  +
  111.     +  00  P76543210 0000:0000 +
  112.     +        0000 Passes       +
  113.     ++++++++++++++++++++++++++++
  114.  
  115.        When the memory test is invoked, either as the result of a parity
  116.     error, or from the command line, the above window will be displayed in
  117.     the upper left corner of the screen.  This window indicates the size of
  118.     the memory being tested, as sensed by NMI, the 64K bank currently being
  119.     tested, and the number of successful test repetitions.  In the interest
  120.     of speed, the 'Address' field is updated only for each 64K bank in this
  121.     window.  The 'Bit' field is used to indicate failing bits and will not
  122.     change unless an error is detected.
  123.  
  124.        If the 'Esc' key is pressed, the memory test will be terminated with
  125.     parity checking enabled, and control passed to the interrupted process.
  126.     Any other key will exit the memory test and display the termination
  127.     options.
  128.  
  129.        The memory test takes approximately 35 seconds per 64K bank, longer
  130.     depending upon other system activity.
  131.  
  132.  
  133.  
  134.     ++++++++++++++++++++++++++++
  135.     +   ** ERROR DETECTED **   +
  136.     + Bank    Bit     Address  +
  137.     +  00  P76543210 0000:0000 +
  138.     + Continue testing? _      +
  139.     ++++++++++++++++++++++++++++
  140.  
  141.        In the event that an error is detected during the memory test, the
  142.     above window will be displayed.  This window indicates the failing 64K
  143.     bank, exact address, and bit(s).  Depending upon the display type and
  144.     video mode active at the time of the failure, the failing bit(s) will
  145.     be indicated either by blinking, or non-display.  These bit(s) directly
  146.     correspond to the failing chip(s) in the indicated 64K bank.
  147.  
  148.        Pressing 'Y' (or DDY) will continue the memory test starting with
  149.     the next byte.  The number of successful passes will be reset to zero.
  150.     Pressing 'N' will exit the memory test and display the termination
  151.     options.
  152.  
  153.                           NMI (Non-Maskable Interrupt)
  154.  
  155.  
  156.  
  157.  
  158.  
  159.     ++++++++++++++++++++++++++++
  160.     + 1) Continue with parity  +
  161.     + 2) Continue w/o  parity  +
  162.     + 3) Reboot system         +
  163.     + Enter selection: _       +
  164.     ++++++++++++++++++++++++++++
  165.  
  166.        The termination option window is displayed as a result of any key
  167.     other than 'Esc' being pressed during the memory test, or electing not
  168.     to continue testing following an error detection.  Selecting option 1
  169.     will return to the interrupted process with parity checking enabled.
  170.     Selecting option 2 will resume the interrupted process without parity
  171.     checking.  Option 3 will reboot the system.  Pressing DDY will restart
  172.     the memory test.
  173.  
  174.  
  175.  
  176.     RETURN CODES
  177.     ------------
  178.  
  179.        If NMI is invoked from within a batch file, or by another process, a
  180.     return code may be retrieved indicating any errors.  For batch files,
  181.     the return code may be interrogated using the 'IF ERRORLEVEL' batch
  182.     subcommand.  The following table indicates possible return codes for
  183.     the current release.
  184.  
  185.           0 - Successful, no errors detected.
  186.  
  187.           1 - Error detected in parameters, program aborted.
  188.  
  189.           2 - NMI was invoked with the 'I' parameter, but is already
  190.               installed.  Installation aborted.
  191.  
  192.           4 - Memory test already active, no memory test performed.  This
  193.               error can occur in multi-partition systems if memory test is
  194.               called while active in another partition.
  195.  
  196.        It is possible for more than one error to be returned in the return
  197.     code.  For example, a return code of 6 indicates both errors 2 and 4
  198.     occurred.
  199.  
  200.  
  201.  
  202.     PROGRAM DESIGN CONSIDERATIONS
  203.     -----------------------------
  204.  
  205.        Certain performance and function trade-offs are made in the design
  206.     of every program.  These trade-offs are usually made in an attempt to
  207.     provide the most function within the constraints imposed by the
  208.     operating environment in which the program must run.  In this case, the
  209.     following criteria were taken into consideration.
  210.  
  211.     1) All resident programs must use the smallest possible amount of
  212.        memory.
  213.  
  214.     2) During the memory test, it is assumed that a memory failure has
  215.        occurred.  It is possible that the memory failure occurred in the
  216.        resident portion of DOS.  For this reason, DOS function calls must
  217.        not be used within the resident NMI code.
  218.  
  219.              No attempt is made to save and restore the contents of
  220.            graphics screens.  This would have required additional code
  221.            and buffer space within the resident portion of the program.
  222.            If a disk file had been used to save the video buffer, DOS
  223.            function calls would have been required, increasing the
  224.            possibility of program check during the memory test.
  225.  
  226.     3) The memory test should first attempt to find the failure using a
  227.        read operation, so that the original failure remains undisturbed.
  228.        If the read operation fails to produce the error, only then should
  229.        write operations be used.  Furthermore, the failure should be
  230.        located in a single pass through memory, if possible.  This method
  231.        will provide the best odds of locating an intermittent failure.
  232.  
  233.              Memory test execution is slow, only because the test is
  234.            thorough.
  235.  
  236.