1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 06:31:31 +00:00
cc65/libsrc/pce/clock.s
2015-08-29 15:58:57 +02:00

31 lines
475 B
ArmAsm

;
; clock_t clock (void);
;
.include "pce.inc"
.export _clock
.importzp sreg
.proc _clock
lda tickcount+3
sta sreg+1
lda tickcount+2
sta sreg
ldx tickcount+1
lda tickcount
rts
.endproc
.constructor initclock, 24
initclock:
lda #0
ldx #3
@lp: sta tickcount,x
dex
bpl @lp
rts