- lda #0 ; Byte 3 is always zero
- sta sreg+1
- php ; Save current I flag value
- sei ; Disable interrupts
+ ldx #5 ; Synchronize with Antic, so the interrupt won't change RTCLOK
+ stx WSYNC ; while we're reading it. The synchronization is done same as
+@L1: dex ; in SETVBLV function in Atari OS.
+ bne @L1
+ stx sreg+1 ; Byte 3 is always zero