Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Processes
Chapter 4 - Vertical Retrace Manager / Vertical Retrace Manager Reference
Vertical Retrace Manager Routines / Utility Routines


DoVBLTask

Slot interrupt handlers for video cards should call the DoVBLTask function to handle the execution of VBL tasks.

FUNCTION DoVBLTask (theSlot: Integer): OSErr;
theSlot
Slot number corresponding to the vertical retrace queue whose tasks are to be executed.
DESCRIPTION
The DoVBLTask function decrements the vblCount field of each task in the vertical retrace queue corresponding to the theSlot parameter (except for tasks whose vblCount field already contains the value 0). The function executes a task if decrementing the vblCount field for a task record results in a value of 0.

If theSlot designates the slot of the primary video device, the position of the cursor is also updated.

Slot interrupt handlers for video cards need to call this function to execute any tasks in the queue for that slot. You can also call this function if you need to simulate vertical retrace interrupts.

ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit for DoVBLTask are
Registers on entry
D0Slot number
Registers on exit
D0Result code

To reduce overhead at interrupt time, instead of executing the _DoVBLTask trap, you can load the jump vector jDoVBLTask into an address register and execute a JSR instruction using that register.

RESULT CODES
noErr0No error
slotNumErr-360Invalid slot number


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUN 1996