2 ; from Atari computer version by Christian Groessler, 2014
4 ; clock_t clock (void);
5 ; unsigned _clocks_per_sec (void);
11 .include "atari5200.inc"
16 ldx #5 ; Synchronize with Antic, so the interrupt won't change RTCLOK
17 stx WSYNC ; while we're reading it. The synchronization is done same as
18 @L1: dex ; in SETVBLV function in Atari OS.
20 stx sreg+1 ; Byte 3 is always zero
21 stx sreg ; Byte 2 is always zero, too