Trap Is What Type Of Interrupt?


1 Answers

Tim Cook Profile
Tim Cook answered

A trap is a type of synchronous interrupt, often caused by attempting to divide a number by zero, a segmentation fault (if using C programming code) or encountering an internal, programmed gap or 'pause' in the code allowing the system to check whether the user's instruction should be interrupted. 

If you need help with synchronous interrupts, there's plenty of guidance online. A good place to start is Chapter 17 of Randall Hyde's guide The Art of Assembly Language Programming, available to read for free at: This is also available as a PDF at

Other sites where you can learn more about the exceptions in the user programs cause traps at, or

For other Blurtit answers to similar questions, read What are the differences between a trap and an interrupt? What is the use of each function? or What Is Meant By Interrupt? or perhaps What Is TRAP Interrupt?

Answer Question