Trap

From JargonWiki

Jump to: navigation, search
The Jargon File

Parts of this article are based on the Jargon File, v. 4.4.7,
a public domain document of hacker jargon.

Image:Glider-small.png
trap
Usage: n. vi.


trap: n. vi.

  1. n. A program interrupt, usually an interrupt caused by some exceptional situation in the user program. In most cases, the OS performs some action, then returns control to the program.
  2. vi. To cause a trap. "These instructions trap to the monitor." Also used transitively to indicate the cause of the trap. "The monitor traps all input/output instructions."

This term is associated with assembler programming (interrupt or exception is more common among HLL programmers) and appears to be fading into history among programmers as the role of assembler continues to shrink. However, it is still important to computer architects and systems hackers (see system, sense 1), who use it to distinguish deterministically repeatable exceptions from timing-dependent ones (such as I/O interrupts).

Sources

Source: trap, in The Jargon File, version 4.4.7.


Public Domain

This article is in the public domain and is not subject to copyright, trademark, or any other legal protection of intellectual property.
Any and all user contributions to this page are also immediately dedicated to the public domain.
Editors of this page must accede to these terms as special conditions of the standard editing privileges.

Image:Public_Domain_sm.png
Toolbox