mirror of
https://github.com/cc65/cc65.git
synced 2024-11-18 00:07:21 +00:00
29 lines
504 B
ArmAsm
29 lines
504 B
ArmAsm
;
|
|
; Written by Groepaz <groepaz@gmx.net>
|
|
;
|
|
; void waitvsync (void);
|
|
;
|
|
|
|
.export _waitvsync
|
|
.import PALFLAG
|
|
.import sys_bank, restore_bank
|
|
|
|
.importzp vic
|
|
|
|
.include "cbm510.inc"
|
|
|
|
_waitvsync:
|
|
jsr sys_bank ; Switch to the system bank
|
|
sei
|
|
|
|
ldy #VIC_CTRL1
|
|
@l1:
|
|
lda (vic),y
|
|
bpl @l1
|
|
@l2:
|
|
lda (vic),y
|
|
bmi @l2
|
|
|
|
cli
|
|
jmp restore_bank
|