mirror of
https://github.com/cc65/cc65.git
synced 2024-09-28 10:55:43 +00:00
Optimize for size.
This commit is contained in:
parent
3598fb505d
commit
03a99569e3
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
.export _time
|
.export _time
|
||||||
|
|
||||||
.import decsp1
|
.import decsp1, ldeaxi
|
||||||
.importzp ptr1, sreg, tmp1, tmp2
|
.importzp ptr1, sreg, tmp1, tmp2
|
||||||
|
|
||||||
.include "time.inc"
|
.include "time.inc"
|
||||||
@ -27,12 +27,10 @@
|
|||||||
ldx #>time
|
ldx #>time
|
||||||
jsr _clock_gettime
|
jsr _clock_gettime
|
||||||
sta tmp2
|
sta tmp2
|
||||||
lda time + timespec::tv_sec+2
|
lda #<time
|
||||||
ldx time + timespec::tv_sec+3
|
ldx #>time
|
||||||
sta sreg
|
.assert timespec::tv_sec = 0, error
|
||||||
stx sreg+1
|
jsr ldeaxi
|
||||||
lda time + timespec::tv_sec
|
|
||||||
ldx time + timespec::tv_sec+1
|
|
||||||
sta tmp1 ; Save low byte of result
|
sta tmp1 ; Save low byte of result
|
||||||
|
|
||||||
; Restore timep and check if it is NULL
|
; Restore timep and check if it is NULL
|
||||||
|
Loading…
Reference in New Issue
Block a user