home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / pascal / err87_13.zip / NMI.ZIP / NMI.DOC < prev   
Text File  |  1990-08-15  |  2KB  |  47 lines

  1. NMI - Enable or disable the non-maskable interrupt on a PC or XT.
  2.       Written by D.J. Murdoch for the public domain.  Feb 1988
  3.  
  4. Usage:
  5.  
  6. NMI ON - enables the NMI (interrupt 2)
  7. NMI OFF - disables it
  8.  
  9. N.B. The lazy author requires that you put exactly one space before the 
  10. ON/OFF, and none after, or you'll get the usage message. 
  11.  
  12. Description:
  13.  
  14. I don't have any idea where the non-maskable interrupt got its name, but 
  15. it's used for two purposes in a PC.  It can be invoked by parity errors 
  16. in memory and by various kinds of errors in an 8087 coprocessor.  
  17. However, unless it is specifically turned on, it does nothing. 
  18.  
  19. I wrote this program because the current release of Turbo Pascal (version 
  20. 4.0) neglects to turn it on before telling the 8087 that it's okay to 
  21. generate interrupts.  So, the first overflow or zero divide that you get 
  22. causes the 8087 to request an interrupt, but the 8086/8088 won't give it 
  23. one.  The 8087 never completes the instruction that caused the problem, 
  24. and the machine locks up.  
  25.  
  26. Interestingly enough, IBM fixed this problem on the AT.  The 80287 
  27. requests a different interrupt (number 75h), which the BIOS reroutes to 
  28. the same address as the NMI.  You'll just have to experiment to find out 
  29. what happens on any other brand.  
  30.  
  31. One nagging question in the back of my mind is why the NMI defaults off.  
  32. The XT manual specifically warns you to turn it on before using the 8087 
  33. error checking.  If anyone can tell me the reasoning here, please send me 
  34. a message at the address below. 
  35.  
  36. NMI was written in A86, the shareware assembler.
  37.  
  38. Method:
  39.  
  40. To enable the NMI, the program sends 80h out port A0h.  To disable it, it 
  41. sends a 0 out the same port.  
  42.  
  43. Comments or questions:
  44.  
  45. Send them via Fidonet to DJ MURDOCH, at node 1:221/177.40. 
  46.  
  47.