5.2. Interrupt Handlers
Learning Objectives
When you have finished section 5.2, you should be able to:
- Explain what interrupt handlers are.
- Work with interrupt handlers in games.
Required Tasks
- Study the Interrupt Handlers section of Chapter 11 in the eTextbook.
- Carefully study all the routines dealing with interrupt handlers.
- Type the source code of the InterruptTest program into your Dev-C++, and study carefully.
Optional Tasks
- Load the InterruptTest example program from the Files link below, and play with the code.
- Build and run the program.
Files (InterruptTest)
Review Questions
- What is an interrupt handler?
- How do you create an interrupt handler?
- Why is the interrupt handler more powerful than the timer?
- How do you remove an interrupt handler?
- Why do some variables used in interrupt handlers need to be declared as volatile and locked?
- How do you calculate the frame rate of a game program using an interrupt handler?
Updated May 24 2016 by FST Course Production