1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-27 00:29:31 +00:00
cc65/libsrc/cx16/waitvsync.s

25 lines
496 B
ArmAsm
Raw Normal View History

;
; 2021-04-01, Greg King
;
; void waitvsync (void);
; /* Wait for the start of the next video field. */
;
; VERA's vertical sync causes IRQs which increment the jiffy timer.
;
; Updated by ZeroByteOrg to use Kernal API RDTIM to retreive the TIMER variable
;
.export _waitvsync
.importzp tmp1
.import RDTIM
.proc _waitvsync: near
jsr RDTIM
sta tmp1
keep_waiting:
jsr RDTIM
cmp tmp1
beq keep_waiting
rts
.endproc