Skip To Content

Athabasca University

5.2. Interrupt Handlers

Learning Objectives

When you have finished section 5.2, you should be able to:

  1. Explain what interrupt handlers are.
  2. Work with interrupt handlers in games.

Required Tasks

  1. Study the Interrupt Handlers section of Chapter 11 in the eTextbook.
  2. Carefully study all the routines dealing with interrupt handlers.
  3. Type the source code of the InterruptTest program into your Dev-C++, and study carefully.

Optional Tasks

  1. Load the InterruptTest example program from the Files link below, and play with the code.
  2. Build and run the program.

Files (InterruptTest)

Review Questions

  1. What is an interrupt handler?
  2. How do you create an interrupt handler?
  3. Why is the interrupt handler more powerful than the timer?
  4. How do you remove an interrupt handler?
  5. Why do some variables used in interrupt handlers need to be declared as volatile and locked?
  6. How do you calculate the frame rate of a game program using an interrupt handler?

Updated May 24 2016 by FST Course Production