Jan 132018
 
Replacement for 'memory parity err'.
File NMI103.ZIP from The Programmer’s Corner in
Category System Diagnostics
Replacement for ‘memory parity err’.
File Name File Size Zip Size Zip Type
NMI.COM 2304 1722 deflated
NMI.DOC 12171 3616 deflated

Download File NMI103.ZIP Here

Contents of the NMI.DOC file





NMI Version 1.03
by Dennis Lee


Have you ever seen the message 'PARITY CHECK' on your
display? If you have, you've probably noticed that it
always seems to happen at the most inopportune time. You're
cruising along putting the finishing touches on something
that you've worked long and hard, just to look up from the
keyboard to a blank display with only the words 'PARITY
CHECK' in the upper left corner. Your heart sinks into your
shoes, your face gets flush, and palms begin to sweat, as
you try franticly to figure a way out of this one... but you
KNOW that you've lost everything! Your only option is to
power off and start over.

NMI is a resident program to replace the non-maskable
interrupt handler that the PC uses to handle parity errors.
In the event of a parity error, NMI will interrupt the
currently executing program(s) and begin testing memory,
looking for the error. It will continue testing until
either it locates a failing address, or you interrupt it by
pressing a key. If a failure is located, NMI will display
the failing 64K bank, exact memory address, and if possible,
the failing bit(s). You have the option to continue or
terminate testing. If you interrupt the memory test, or
elect not to continue testing after an error is detected,
you are given the options to return to the interrupted
program(s) with or without parity checking enabled, or to
reboot the system.

The memory test is of a nondestructive type, in that it
will preserve the current contents of memory. It can be
executed any time without regard for concurrently executing
processes. It's also a very thorough test, reading and
writing each byte of memory with several different bit
patterns and checking for parity errors following each read
or write operation. Every memory location is tested,
including the locations used by NMI.

This all sounds a bit like insurance doesn't it? It
doesn't do you a bit of good unless you have a tragedy on
your hands. Well, I like programs that you can play with,
and since you've got this neat little memory test just
sitting there in memory, why not be able to use it? NMI will
execute the memory test any time you like, as many times as
you like!

If you're like me (a memory miser), the question in your
mind right now is... 'Just how much memory does this thing
eat?'. The answer, approximately 1.8K including the Program
Segment Prefix and a normal size environment. In English,
that means about 1.8K TOTAL! Even I can afford that.







Page 1






NMI Version 1.03
by Dennis Lee


PROGRAM LOADING
---------------

NMI /Q/I/T####
| | |
| | Test memory #### times.
| |
| | If the number of test repetitions is 0 or
| | blank, then the memory test loops indefinitely
| | until an error is detected or you interrupt it
| | by pressing a key. This option may be used to
| | invoke the memory test from the command line
| | or a batch file. NMI need not be installed to
| | run the memory test.
| |
| Install NMI.
|
| This option must be selected the first time NMI
| is executed if you desire to replace the current
| non-maskable interrupt handler. It need not,
| and should not be specified again.
|
Quiet

This option is selected to suppress display of the
program logo when NMI is installed.


* If no parameters are specified, or the specified
parameters are invalid, NMI will display the program logo
followed by a summary of valid parameters.

* Parameters need not be separated, however, they may be
separated by one or more spaces, tabs, commas, slashes,
or semicolons.

* Alphabetic parameters may be upper or lower case.

* Parameters may be entered in any order or combination so
long as the number of test repetitions follows the 'T'
parameter and they are not separated by another
parameter.














Page 2






NMI Version 1.03
by Dennis Lee


+--------------------------+
| TESTING ####K MEMORY |
| Bank Bit Address |
| 00 P76543210 0000:0000 |
| 0000 Passes |
+--------------------------+

When the memory test is invoked, either as the result of
a parity error, or from the command line, the above window
will be displayed in the upper left corner of the screen.
This window indicates the size of the memory being tested,
as sensed by NMI, the 64K bank currently being tested, and
the number of successful test repetitions. In the interest
of speed, the 'Address' field is updated only for each 64K
bank in this window. The 'Bit' field is used to indicate
failing bits and will not change unless an error is
detected.

If the 'Esc' key is pressed, the memory test will be
terminated with parity checking enabled, and control passed
to the interrupted process. Any other key will exit the
memory test and display the termination options.

Pass one of the memory test is always executed in a read
only mode. This increases the possibility of detecting the
failing address. If an error is detected in the first pass,
the address will will be written to in hopes of detecting
the failing bit. The memory test takes approximately 35
seconds per 64K bank, longer depending upon other system
activity.


+--------------------------+
| ** ERROR DETECTED ** |
| Bank Bit Address |
| 00 P76543210 0000:0000 |
| Continue testing? _ |
+--------------------------+

In the event that an error is detected during the memory
test, the above window will be displayed. This window
indicates the failing 64K bank, exact address, and bit(s).
Depending upon the display type and video mode active at the
time of the failure, the failing bit(s) will be indicated
either by blinking, or non-display. These bit(s) directly
correspond to the failing chip(s) in the indicated 64K bank.
In the event that the failing bit cannot be isolated, all
bits in the failing address will be indicated.

Pressing 'Y' (or ENTER) will continue the memory test
starting with the next byte. The number of successful
passes will be reset to zero. Pressing 'N' will exit the
memory test and display the termination options.



Page 3






NMI Version 1.03
by Dennis Lee


+--------------------------+
| 1) Continue with parity |
| 2) Continue w/o parity |
| 3) Reboot system |
| Enter selection: _ |
+--------------------------+

The termination option window is displayed as a result of
any key other than 'Esc' being pressed during the memory
test, or electing not to continue testing following an error
detection. Selecting option 1 will return to the
interrupted process with parity checking enabled. Selecting
option 2 will resume the interrupted process without parity
checking. Option 3 will reboot the system. Pressing ENTER
will restart the memory test.


RETURN CODES
------------

If NMI is invoked from within a batch file, or by another
process, a return code may be retrieved indicating any
errors. For batch files, the return code may be
interrogated using the 'IF ERRORLEVEL' batch subcommand.
The following table indicates possible return codes for the
current release.

0 - Successful, no errors detected.

1 - Error detected in parameters, program aborted.

2 - NMI was invoked with the 'I' parameter, but is
already installed. Installation aborted.

4 - Memory test already active, no memory test
performed. This error can occur in multi-partition
systems if memory test is called while active in
another partition.

It is possible for more than one error to be returned in
the return code. For example, a return code of 6 indicates
both errors 2 and 4 occurred.














Page 4






NMI Version 1.03
by Dennis Lee


PROGRAM DESIGN CONSIDERATIONS
-----------------------------

Certain performance and function trade-offs are made in
the design of every program. These trade-offs are usually
made in an attempt to provide the most function within the
constraints imposed by the operating environment in which
the program must run. In this case, the following criteria
were taken into consideration.

1) All resident programs must use the smallest possible
amount of memory.

2) During the memory test, it is assumed that a memory
failure has occurred. It is possible that the memory
failure occurred in the resident portion of DOS. For
this reason, DOS function calls must not be used within
the resident NMI code.

No attempt is made to save and restore the contents of
graphics screens. This would have required additional
code and buffer space within the resident portion of
the program. If a disk file had been used to save the
video buffer, DOS function calls would have been
required, increasing the possibility of program check
during the memory test.

3) The memory test should first attempt to find the failure
using a read operation, so that the original failure
remains undisturbed. If the read operation fails to
produce the error, only then should write operations be
used. Furthermore, the failure should be located in a
single pass through memory, if possible. This method
will provide the best odds of locating an intermittent
failure.





















Page 5





 January 13, 2018  Add comments

Leave a Reply