1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-25 17:29:50 +00:00
cc65/libsrc/telestrat/clock.s

29 lines
577 B
ArmAsm
Raw Normal View History

;
; 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
2021-03-11 21:52:41 +00:00
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