1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 06:31:31 +00:00
cc65/libsrc/cbm510/waitvsync.s

29 lines
504 B
ArmAsm
Raw Normal View History

2017-07-17 23:04:53 +00:00
;
; Written by Groepaz <groepaz@gmx.net>
;
; void waitvsync (void);
;
2016-02-28 21:35:46 +00:00
2017-07-17 21:15:05 +00:00
.export _waitvsync
2016-02-28 21:35:46 +00:00
.import PALFLAG
.import sys_bank, restore_bank
.importzp vic
.include "cbm510.inc"
2016-02-28 21:35:46 +00:00
2017-07-17 21:15:05 +00:00
_waitvsync:
2017-07-17 23:04:53 +00:00
jsr sys_bank ; Switch to the system bank
2016-02-28 21:35:46 +00:00
sei
2017-07-17 23:04:53 +00:00
ldy #VIC_CTRL1
@l1:
2017-07-17 23:04:53 +00:00
lda (vic),y
bpl @l1
@l2:
2017-07-17 23:04:53 +00:00
lda (vic),y
bmi @l2
2016-02-28 21:35:46 +00:00
cli
2018-08-14 14:00:09 +00:00
jmp restore_bank