2 ; Ullrich von Bassewitz, 25.07.2000
4 ; Implemented using information from Sidney Cadot <sidney@janis.pds.twi.tudelft.nl>
6 ; clock_t clock (void);
7 ; unsigned _clocks_per_sec (void);
10 .export _clock, __clocks_per_sec
18 lda #0 ; Byte 3 is always zero
20 php ; Save current I flag value
21 sei ; Disable interrupts
24 lda RTCLOK ; Read clock
26 plp ; Restore old I bit
32 .proc __clocks_per_sec
35 ldx PAL ; use hw register, PALNTS is only supported on XL/XE ROM