make time zone work
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
#include <rp6502.h>
|
||||
#include <time.h>
|
||||
|
||||
int clock_gettimezone (time_t time, clockid_t clock_id, struct _timezone* tz);
|
||||
|
||||
void ria_tzset (unsigned long time)
|
||||
{
|
||||
clock_gettimezone (time, CLOCK_REALTIME, &_tz);
|
||||
}
|
||||
29
libsrc/rp6502/tzset_time.s
Normal file
29
libsrc/rp6502/tzset_time.s
Normal file
@@ -0,0 +1,29 @@
|
||||
; tzset_time.s
|
||||
;
|
||||
; This file is part of
|
||||
; cc65 - a freeware C compiler for 6502 based systems
|
||||
;
|
||||
; https://cc65.github.io
|
||||
;
|
||||
; See "LICENSE" file for legal information.
|
||||
;
|
||||
; void __fastcall__ tzset_time (time_t* time);
|
||||
;
|
||||
|
||||
.export _tzset_time
|
||||
.import _clock_gettimezone, __tz
|
||||
.import pushax, ldax0sp, ldeaxi, pusheax, pusha, incsp2
|
||||
.include "time.inc"
|
||||
|
||||
|
||||
_tzset_time:
|
||||
jsr pushax
|
||||
jsr ldax0sp
|
||||
jsr ldeaxi
|
||||
jsr pusheax
|
||||
lda #CLOCK_REALTIME
|
||||
jsr pusha
|
||||
lda #<(__tz)
|
||||
ldx #>(__tz)
|
||||
jsr _clock_gettimezone
|
||||
jmp incsp2
|
||||
Reference in New Issue
Block a user