Apple IIc #9
Detecting VBL

Written by Dan Strnad (November 1989)

This Technical Note describes how the VBLInt flag at $C019 behaves differently than documented in the Apple IIc Technical Reference Manual, Second Edition, when being polled.


The Apple IIc Technical Reference Manual, Second Edition, claims that reading $C019 reads and resets the VBLInt flag. This is not correct. After reading $C019 once the high bit has been set to flag VBL, the high bit remains set. A program polling VBL at $C019 would have to access either PTrig at $C070 or RdIOUDis at $C07E to reset the high-bit for $C019. Note that IOUDis must have been turned off by writing to $C07F then ENVBL accessed at $C05B in order to poll for $C019 on the IIc.

Developers are encouraged to detect VBL using an interrupt handler with one of the VBL-based mouse modes on the IIc, if possible.

Further Reference


This and all of the other Apple II Technical Notes have been converted to HTML by Aaron Heiss as a public service to the Apple II community, with permission by Apple Computer, Inc. Any and all trademarks, registered and otherwise, are properties of their owners.