HOME

TheInfoList



OR:

In
computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, e ...
, a non-maskable interrupt (NMI) is a hardware
interrupt In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted, ...
that standard interrupt-masking techniques in the system cannot ignore. It typically occurs to signal attention for non-recoverable hardware
error An error (from the Latin ''error'', meaning "wandering") is an action which is inaccurate or incorrect. In some usages, an error is synonymous with a mistake. The etymology derives from the Latin term 'errare', meaning 'to stray'. In statistics ...
s. Some NMIs may be masked, but only by using proprietary methods specific to the particular NMI. An NMI is often used when response time is critical or when an interrupt should never be disabled during normal system operation. Such uses include reporting non-recoverable hardware errors, system debugging and profiling, and handling of special cases like system resets. Modern
computer architecture In computer engineering, computer architecture is a description of the structure of a computer system made from component parts. It can sometimes be a high-level description that ignores details of the implementation. At a more detailed level, t ...
s typically use NMIs to handle non-recoverable errors which need immediate attention. Therefore, such interrupts should not be masked in the normal operation of the system. These errors include non-recoverable internal system
chipset In a computer system, a chipset is a set of electronic components An electronic component is any basic discrete device or physical entity in an electronic system used to affect electrons or their associated fields. Electronic components are ...
errors, corruption in system memory such as parity and ECC errors, and data corruption detected on system and peripheral buses. On some systems, a computer user can trigger an NMI through hardware and software
debugging In computer programming and software development, debugging is the process of finding and resolving '' bugs'' (defects or problems that prevent correct operation) within computer programs, software, or systems. Debugging tactics can involve in ...
interfaces and system reset buttons. Programmers typically use debugging NMIs to diagnose and fix faulty code. In such cases, an NMI can execute an
interrupt handler In computer systems programming, an interrupt handler, also known as an interrupt service routine or ISR, is a special block of code associated with a specific interrupt condition. Interrupt handlers are initiated by hardware interrupts, softw ...
that transfers control to a special monitor program. From this program, a developer can inspect the machine's memory and examine the internal state of the program at the instant of its interruption. This also allows the debugging or diagnosing of computers which appear
hung Hung may refer to: People * Hung (surname), various Chinese surnames * Hùng king, a king of Vietnam People with the given name Hung include: * Hung Huynh, Vietnamese-American chef, winner of the third season of the television show ''Top Chef'' ...
.


History

In older architectures, NMIs were used for interrupts which were typically never disabled because of the required response time. They were hidden signals. Examples include the
floppy disk A floppy disk or floppy diskette (casually referred to as a floppy, or a diskette) is an obsolescent type of disk storage composed of a thin and flexible disk of a magnetic storage medium in a square or nearly square plastic enclosure lined w ...
controller on the Amstrad PCW, the
8087 The Intel 8087, announced in 1980, was the first x87 floating-point coprocessor for the 8086 line of microprocessors. The purpose of the 8087 was to speed up computations for floating-point arithmetic, such as addition, subtraction, multi ...
coprocessor on the
x86 x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel based on the Intel 8086 microprocessor and its 8088 variant. The 8086 was intr ...
when used in the IBM PC or its compatibles (even though Intel recommended connecting it to a normal interrupt), and the Low Battery signal on the
HP 95LX The HP 95LX Palmtop PC (F1000A, F1010A), also known as ''project Jaguar'', was Hewlett Packard's first MS-DOS-based pocket computer, or personal digital assistant, introduced in April 1991 in collaboration with Lotus Development Corporation. ...
. In the original
IBM PC The IBM Personal Computer (model 5150, commonly known as the IBM PC) is the first microcomputer released in the IBM PC model line and the basis for the IBM PC compatible de facto standard. Released on August 12, 1981, it was created by a team ...
, an NMI was triggered if a parity error was detected in system memory, or reported by an external device. In either case, the PC would display an error message and halt. Some later PC clones used an NMI to conceal the hardware differences from that of a standard PC. On such computers, an NMI would be generated when a program attempted to access incompatible hardware. A
BIOS In computing, BIOS (, ; Basic Input/Output System, also known as the System BIOS, ROM BIOS, BIOS ROM or PC BIOS) is firmware used to provide runtime services for operating systems and programs and to perform hardware initialization during the ...
interrupt handler In computer systems programming, an interrupt handler, also known as an interrupt service routine or ISR, is a special block of code associated with a specific interrupt condition. Interrupt handlers are initiated by hardware interrupts, softw ...
would then translate the program's request to match the hardware that was actually present. The SMM in the 386SL is a better way to do this. Some 8-bit home computers used the NMI line to permit a "warm start" if the system had locked up. Typically, this would restore the control registers to known good values stored in
ROM Rom, or ROM may refer to: Biomechanics and medicine * Risk of mortality, a medical classification to estimate the likelihood of death for a patient * Rupture of membranes, a term used during pregnancy to describe a rupture of the amniotic sac * ...
, without destroying whatever data that the user might currently have loaded. On the
Commodore Commodore may refer to: Ranks * Commodore (rank), a naval rank ** Commodore (Royal Navy), in the United Kingdom ** Commodore (United States) ** Commodore (Canada) ** Commodore (Finland) ** Commodore (Germany) or ''Kommodore'' * Air commodore ...
8-bit machines, the key was hooked up directly or indirectly to the NMI line on the
6502 The MOS Technology 6502 (typically pronounced "sixty-five-oh-two" or "six-five-oh-two") William Mensch and the moderator both pronounce the 6502 microprocessor as ''"sixty-five-oh-two"''. is an 8-bit microprocessor that was designed by a small te ...
-series CPU, but the reset would take place only if the NMI handler routine in ROM detected that was also being held down when was struck (this combination being the
Commodore Commodore may refer to: Ranks * Commodore (rank), a naval rank ** Commodore (Royal Navy), in the United Kingdom ** Commodore (United States) ** Commodore (Canada) ** Commodore (Finland) ** Commodore (Germany) or ''Kommodore'' * Air commodore ...
version of a three finger salute).
Commodore Commodore may refer to: Ranks * Commodore (rank), a naval rank ** Commodore (Royal Navy), in the United Kingdom ** Commodore (United States) ** Commodore (Canada) ** Commodore (Finland) ** Commodore (Germany) or ''Kommodore'' * Air commodore ...
also connected the
MOS Technology MOS Technology, Inc. ("MOS" being short for Metal Oxide Semiconductor), later known as CSG (Commodore Semiconductor Group) and GMT Microelectronics, was a semiconductor design and fabrication company based in Audubon, Pennsylvania. It is mos ...
6526 CIA #2 in the C64 and C128 to the processor's NMI line, which was part of the means by which software emulation of the 6551 ACIA was accomplished.
Atari Atari () is a brand name that has been owned by several entities since its inception in 1972. It is currently owned by French publisher Atari SA through a subsidiary named Atari Interactive. The original Atari, Inc. (1972–1992), Atari, Inc., ...
's 8-bit line used a button for this same purpose. Debugging NMIs have appeared in a number of forms, including the
Apple Macintosh The Mac (known as Macintosh until 1999) is a family of personal computers designed and marketed by Apple Inc., Apple Inc. Macs are known for their ease of use and minimalist designs, and are popular among students, creative professionals, and ...
's "programmers' button", and certain key combinations on
Sun The Sun is the star at the center of the Solar System. It is a nearly perfect ball of hot plasma, heated to incandescence by nuclear fusion reactions in its core. The Sun radiates this energy mainly as light, ultraviolet, and infrared radi ...
workstations. With the introduction of
Windows 2000 Windows 2000 is a major release of the Windows NT operating system developed by Microsoft and oriented towards businesses. It was the direct successor to Windows NT 4.0, and was released to manufacturing on December 15, 1999, and was officiall ...
,
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washing ...
allowed the use of an NMI to cause a system to either break into a
debugger A debugger or debugging tool is a computer program used to test and debug other programs (the "target" program). The main use of a debugger is to run the target program under controlled conditions that permit the programmer to track its executi ...
, or dump the contents of memory to disk and reboot. Debugging NMIs have also been used by devices that allow leisure users and gamers to manipulate running programs. Devices which added a button to generate an NMI, such as Romantic Robot's
Multiface The Multiface was a hardware peripheral released by Romantic Robot for several 1980s home computers. The primary function of the device was to dump the computer's memory to external storage. Pressing a red button on the Multiface activated it. ...
, were a popular accessory for 1980s 8-bit and 16-bit home computers. These peripherals had a small amount of
ROM Rom, or ROM may refer to: Biomechanics and medicine * Risk of mortality, a medical classification to estimate the likelihood of death for a patient * Rupture of membranes, a term used during pregnancy to describe a rupture of the amniotic sac * ...
and an NMI button. Pressing the button transferred control to the software in the peripheral's ROM, allowing the suspended program to be saved to disk (very useful for tape-based games with no disk support, but also for saving games in progress), screenshots to be saved or printed, or values in memory to be manipulated—a cheating technique to acquire extra lives, for example. Not all computers provide a mechanism for triggering NMIs; however, many machines (typically
rackmount A 19-inch rack is a standardized frame or enclosure for mounting multiple electronic equipment modules. Each module has a front panel that is wide. The 19 inch dimension includes the edges or "ears" that protrude from each side of the equ ...
servers) provide a physical button specifically for this purpose. Other machines may expose this functionality via an expansion card.
Miles Gordon Technology {{unreferenced, date=August 2012 Miles Gordon Technology, known as MGT, was a small British company, initially specialising in high-quality add-ons for the ZX Spectrum home computer. It was founded in June 1986 in Cambridge, England by Alan Miles ...
's
DISCiPLE A disciple is a follower and student of a mentor, teacher, or other figure. It can refer to: Religion * Disciple (Christianity), a student of Jesus Christ * Twelve Apostles of Jesus, sometimes called the Twelve Disciples * Seventy disciples in t ...
and +D products for the
ZX Spectrum The ZX Spectrum () is an 8-bit computing, 8-bit home computer that was developed by Sinclair Research. It was released in the United Kingdom on 23 April 1982, and became Britain's best-selling microcomputer. Referred to during development as t ...
featured an NMI-producing "magic button". On the
Nintendo Entertainment System The Nintendo Entertainment System (NES) is an 8-bit third-generation home video game console produced by Nintendo. It was first released in Japan in 1983 as the commonly known as the The NES, a redesigned version, was released in America ...
, an NMI is generated during each
vertical blanking interval In a raster scan display, the vertical blanking interval (VBI), also known as the vertical interval or VBLANK, is the time between the end of the final visible line of a frame or field and the beginning of the first visible line of the next fra ...
. Because these NMIs (often referred to as "vblank interrupts") occur at frequent, regular intervals, code that manipulates game graphics and audio is often executed inside of the NMI handler routine. Clearing the 7th bit of the PPU's
register Register or registration may refer to: Arts entertainment, and media Music * Register (music), the relative "height" or range of a note, melody, part, instrument, etc. * ''Register'', a 2017 album by Travis Miller * Registration (organ), th ...
disables vblank interrupts, and setting it enables them.


See also

*
Advanced Programmable Interrupt Controller In computing, Intel's Advanced Programmable Interrupt Controller (APIC) is a family of interrupt controllers. As its name suggests, the APIC is more advanced than Intel's 8259 Programmable Interrupt Controller (PIC), particularly enabling the con ...
(APIC) *
Inter-processor interrupt An inter-processor interrupt (IPI), also known as a ''shoulder tap'', is a special type of interrupt by which one processor may interrupt another processor in a multiprocessor system if the interrupting processor requires action from the other pr ...
(IPI) *
Interrupt In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted, ...
*
Interrupt handler In computer systems programming, an interrupt handler, also known as an interrupt service routine or ISR, is a special block of code associated with a specific interrupt condition. Interrupt handlers are initiated by hardware interrupts, softw ...
*
Interrupt latency In computing, interrupt latency refers to the delay between the start of an Interrupt Request (IRQ) and the start of the respective Interrupt Service Routine (ISR). For many operating systems, devices are serviced as soon as the device's interrup ...
* Programmable Interrupt Controller (PIC)


Notes


External links

* * {{cite web , url=http://www.seasip.info/AmstradXT/ppctech/section1.html#1.11.5.4 , title=CGA Mode CRTC initialization , work=Amstrad PPC Technical Manual , publisher=seasip.info , accessdate=2013-08-31 Interrupts Debugging pt:Interrupção não-mascarada