1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-27 00:29:31 +00:00
cc65/libsrc/c128/waitvsync.s
2017-07-18 01:04:53 +02:00

31 lines
448 B
ArmAsm

;
; Written by Groepaz <groepaz@gmx.net>
;
; void waitvsync (void);
;
.export _waitvsync
.include "c128.inc"
_waitvsync:
bit MODE
bmi @c80
@l1:
bit VIC_CTRL1
bpl @l1
@l2:
bit VIC_CTRL1
bmi @l2
rts
@c80:
;FIXME: do we have to switch banks?
@l3:
lda VDC_INDEX
and #$20
beq @l3
rts