mirror of
https://github.com/cc65/cc65.git
synced 2024-09-07 09:54:35 +00:00
25 lines
439 B
ArmAsm
25 lines
439 B
ArmAsm
|
;
|
||
|
; Written by Groepaz/Hitmen <groepaz@gmx.net>
|
||
|
; Cleanup by Ullrich von Bassewitz <uz@cc65.org>
|
||
|
;
|
||
|
; clock_t clock (void);
|
||
|
;
|
||
|
|
||
|
.include "nes.inc"
|
||
|
|
||
|
.export _clock
|
||
|
.importzp sreg
|
||
|
|
||
|
|
||
|
.proc _clock
|
||
|
|
||
|
ldy #0 ; High word is always zero
|
||
|
sty sreg+1
|
||
|
sty sreg
|
||
|
ldx tickcount+1 ; ## Problem: Cannot disable ints here
|
||
|
lda tickcount
|
||
|
rts
|
||
|
|
||
|
.endproc
|
||
|
|