I've dug into the origin of the word "trap" in computer engineering. The older documented mentions of the term I can find, is the "trapping mode" in the IBM 704, specifically in the 1955 manual. Anyone aware of any older mentions?

Why I ask

The IBM 704 manual from 1955 is the oldest reference of the word "trap" that I have found. They have a "trapping mode" where they have "transfer traps", for debugging, where all branch instructions (both conditional and unconditional) transfer control to what is esentially the debugger. I.e., they have a "step into the next subroutine call" debug feature, and they are explicit with that "trapping mode" is specfically for that: "the major use of the trapping mode is in program testing, where it permits observation of the flow of control" (the 1955 manual, page 11). If the IBM 704 is actually one of the first uses of the word "trap" in computer architecture, then it is interesting, etymologically, that "traps" were originally a "trapping mode" that hijacked control at branch instructions, rather than the "trap instructions" that it developed into. The difference is that it is not a "software trap" since there is no instruction for it in the software. It is an external "trap". The meaning, rhetorically, becomes a bit different. The processor actually "traps" the program from outside, literally, rather than the program "trapping itself" through an instruction, which is a rhetorically illogical concept.

I am interested in if the word "trap" predates the IBM 704, because I want to falsify or validate my idea about the etymology of "software trap".

  • 1
    I think you're right about the 704 (based on a quick look around likely candidates) but I think you're wrong about the etymology. In particular, it's still a software trap - it is the effect of executing a particular instruction in a particular machine state. Not all software traps are due to an instruction whose primary purpose is the trap.
    – dave
    May 27, 2023 at 11:22
  • Interesting early hardware feature - and yet think lost for many many years. I'm aware of the hardware breakpoints available on x86 via the debug registers, as far back as the 386 - but not really aware of anything earlier than that. Don't think my favorite ISA, PDP-10, had such a thing. (Does it?) Does the 360? I'd be curious what other machines had a trap-on-branch or similar debugging hardware in the ISA.
    – davidbak
    May 27, 2023 at 16:48
  • @another-dave Did not want to bother anyone with my speculation on etymology, but the question seemed a bit random so I just added it as context :)
    – BipedalJoe
    May 27, 2023 at 18:27
  • Per the 704 manual (your link, page 11), trapping mode is set by execution of an ETM instruction, which surely makes it a software thing, and very similar to more recent architectures that have software trap-enables as part of the processor state.
    – dave
    May 27, 2023 at 19:00
  • @another-dave I did not want to bother anyone with my speculation. The question seemed random without mentioning it. The actual question is about earlier uses of trap. I have opened a chat room for any discussion on etymology, since it is not directly related to the question: chat.stackexchange.com/rooms/146314/…, and replied to the topic there.
    – BipedalJoe
    May 27, 2023 at 19:04


You must log in to answer this question.

Browse other questions tagged .