VBL Task: What Is It? (4/95)


What is a VBL task?

VBL refers to Vertical Blanking. The Macintosh video circuitry generates a vertical retrace interrupt (also known as the vertical blanking interrupt) 60 times a second when the beam of the display tube returns from the bottom of the screen to the top of the screen. This interrupt can be used to schedule periodic or recurrent tasks.

The vertical Retrace Manager of the Mac OS defines an Application Program Interface (API) to install or remove a routine that is to be executed during these interrupts. The Mac OS registers (installs) several Vertical Blanking (VBL) tasks to manage activities. Examples of System VBL tasks are:

* Increment the number of ticks (1/60 of a second) since system startup time.
* Check whether the stack has expanded into the heap.
* Handle cursor movement.
* Recognize a change in state of mouse button up or mouse button down.
* Recognize that a floppy disk has been inserted.
* Reset the keyboard if its is reattached.

Applications can also install VBL tasks that exist while it is running or are persistent in the System after its termination.


This article was published in the "Information Alley":
Volume I, Issue 25, Page 13


Article Change History:
21 Apr 1995 - Added keyword; made minor technical updates.

Support Information Services
Published Date: Feb 19, 2012