1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-25 17:29:50 +00:00
cc65/libsrc/cbm510/tmcommon.s

42 lines
1.0 KiB
ArmAsm
Raw Normal View History

;
; Oliver Schmidt, 16.8.2018
;
; Common stuff for the clock routines
;
.include "cbm510.inc"
.export TM, load_tenth
.importzp sreg
;----------------------------------------------------------------------------
.code
.proc load_tenth
lda #<(100 * 1000 * 1000 / $10000)
ldx #>(100 * 1000 * 1000 / $10000)
sta sreg
stx sreg+1
lda #<(100 * 1000 * 1000)
ldx #>(100 * 1000 * 1000)
rts
.endproc
;----------------------------------------------------------------------------
; TM struct with date set to 1970-01-01
.data
TM: .word 0 ; tm_sec
.word 0 ; tm_min
.word 0 ; tm_hour
.word 1 ; tm_mday
.word 0 ; tm_mon
.word 70 ; tm_year
.word 0 ; tm_wday
.word 0 ; tm_yday
.word 0 ; tm_isdst