162
K
A
DAK
Advanced Topics
NMI Breakpoints
Some hardware debuggers may use the non-maskable interrupt (NMI) to generate
breakpoints. The Breakpoint Manager can be tailored to support such debuggers by
enabling its NMI handler.
When an NMI interrupt is detected, the Breakpoint Manager calls the NMI handler to
determine if the interrupt is actually a breakpoint. In some 8086 PC configurations, the
NMI interrupt is multiplexed to detect memory parity errors and to service a numeric
coprocessor such as the Intel 8087, 80287 or 80387.
The NMI handler must determine the actual source of the NMI interrupt. If the handler
determines that the interrupt is a breakpoint, the Breakpoint Manager halts all AMX task
activity and then passes control to your NMI debugger.
If the NMI handler determines that the interrupt is not a breakpoint, the Breakpoint
Manager allows your AMX system to continue execution and passes control on to the
real NMI Interrupt Service Procedure.
The version of module AA831BKA.OBJ which is delivered with AMX assumes that the
NMI interrupt is not used for debugging. If you are using the NMI interrupt for this
purpose, you will have to edit file AA831BKA.ASM to enable NMI handling. The file
contains a simple NMI handler suitable for use on PC/AT compatible hardware. If you
intend to use an NMI debugger, you will have to edit flag AMBKNM in the file to be non
zero. The file contains instructions defining how the editing should be done. Assemble
the module and rebuild the AMX 86 Library to include your version of this module.
Follow the instructions provided in Appendix A of the AMX 86 Tool Guide.
Compatible Debuggers
The Breakpoint Manager will operate with any debugger which exhibits the following
characteristics.
The debugger must use breakpoint software interrupt (INT 3) or the NMI hardware
interrupt (INT 2) to set breakpoints.
When a breakpoint is encountered, the debugger must switch to its own private internal
stack which is different from all AMX task stacks.
The debugger must leave the interrupt controller (or equivalent) interrupt enable mask
unaltered when it proceeds from a breakpoint.