mirror of
https://github.com/cc65/cc65.git
synced 2026-04-26 13:18:31 +00:00
Updated the cx16 library to the Commander X16 Kernal's prerelease 35.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
;
|
||||
; 1998-09-21, Ullrich von Bassewitz
|
||||
; 2019-12-25, Greg King
|
||||
;
|
||||
; clock_t clock (void);
|
||||
;
|
||||
|
||||
.constructor initclock
|
||||
.export _clock
|
||||
|
||||
.import SETTIM, RDTIM
|
||||
.importzp sreg
|
||||
|
||||
|
||||
; clock() counts the amount of time that the process has run.
|
||||
; Therefore, reset it when the program begins.
|
||||
|
||||
.proc initclock
|
||||
|
||||
lda #$00
|
||||
tax
|
||||
tay
|
||||
jmp SETTIM
|
||||
|
||||
.endproc
|
||||
|
||||
|
||||
|
||||
.proc _clock
|
||||
|
||||
stz sreg + 1 ; Byte 3 always is zero
|
||||
jsr RDTIM
|
||||
sty sreg
|
||||
rts
|
||||
|
||||
.endproc
|
||||
Reference in New Issue
Block a user