1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-23 04:30:10 +00:00

Switched to using tmp1 instead of self-mod to store the jiffies value

This commit is contained in:
ZeroByteOrg 2022-08-08 15:17:28 -05:00
parent 78870219a4
commit 9b3b652fa5

View File

@ -10,15 +10,15 @@
;
.export _waitvsync
.importzp tmp1
.proc _waitvsync: near
RDTIM = $FFDE ; Kernal API for reading the jiffy timer
jsr RDTIM
sta lastjiffy
sta tmp1
keep_waiting:
jsr RDTIM
cmp #$FF ; self-mod the value returned by RDTIM to save memory
lastjiffy=(*-1)
cmp tmp1
beq keep_waiting
rts
.endproc