X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libsrc%2Fcbm510%2Fgettime.s;h=5a0a172e499a0dbf522594b24a3841470f9d8a71;hb=eb9872c684c88d5df64e0efb2352378e47cd4428;hp=b89b9b16b2a6c9f642fb638adaac0ed4b5a483e7;hpb=cb7ec508f650e79e1d2527bd3b5fdb86e390f9ed;p=cc65 diff --git a/libsrc/cbm510/gettime.s b/libsrc/cbm510/gettime.s index b89b9b16b..5a0a172e4 100644 --- a/libsrc/cbm510/gettime.s +++ b/libsrc/cbm510/gettime.s @@ -12,6 +12,7 @@ .import pushax, pusheax, tosmul0ax, steaxspidx, incsp1 .import sys_bank, restore_bank + .import TM, load_tenth .importzp sreg, tmp1, tmp2 @@ -54,12 +55,7 @@ ldy #timespec::tv_sec jsr steaxspidx ; Pops address pushed by 2. pushax - lda #<(100 * 1000 * 1000 / $10000) - ldx #>(100 * 1000 * 1000 / $10000) - sta sreg - stx sreg+1 - lda #<(100 * 1000 * 1000) - ldx #>(100 * 1000 * 1000) + jsr load_tenth jsr pusheax ldy #CIA::TOD10 lda (cia2),y @@ -96,17 +92,3 @@ 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