1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-25 02:29:52 +00:00
cc65/libsrc/telestrat/clock.s
2021-03-13 00:15:05 +01:00

29 lines
577 B
ArmAsm

;
; Jede, 2021-03-10
;
; clock_t clock (void);
;
.export _clock
.importzp sreg
.include "telestrat.inc"
.proc _clock
; Clear the timer high 16 bits
ldy #$00
sty sreg
sty sreg+1
; Read the timer
sei ; Disable interrupts
lda TIMEUD ; TIMED contains 1/10 of a second from clock. Telestrat main cardridge simulate a clock from VIA6522 timer
ldx TIMEUD+1
cli ; Reenable interrupts
rts
.endproc