1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-16 02:10:52 +00:00
cc65/libsrc/common/gmtime.s

21 lines
490 B
ArmAsm
Raw Normal View History

;
; Colin Leroy-Mira, 2024
;
; struct tm* __fastcall__ gmtime (const time_t* timep);
;
.export _gmtime
.import __time_t_to_tm
.import ldeaxi
_gmtime:
cpx #$00 ; Check for null pointer
bne :+
cmp #$00
beq no_pointer
: jsr ldeaxi ; Load value from pointer
jmp __time_t_to_tm ; Convert it
no_pointer:
rts ; A/X already set