2016-08-30 20:26:19 +00:00
|
|
|
|
PR#3
|
2017-03-29 15:48:15 +00:00
|
|
|
|
PREFIX /A2OSX.BUILD
|
2017-03-15 16:44:15 +00:00
|
|
|
|
LOMEM $A00
|
2016-08-30 20:26:19 +00:00
|
|
|
|
INC 1
|
|
|
|
|
AUTO 6
|
|
|
|
|
*--------------------------------------
|
2016-08-31 15:38:48 +00:00
|
|
|
|
* https://www.cise.ufl.edu/~cop4600/cgi-bin/lxr/http/source.cgi/lib/ansi/gmtime.c
|
2016-08-30 20:26:19 +00:00
|
|
|
|
*--------------------------------------
|
2016-08-31 15:38:48 +00:00
|
|
|
|
SECSDAY .EQ 86400 60*60*24
|
|
|
|
|
CENTURY0 .EQ 19
|
|
|
|
|
YEAR0 .EQ 70
|
|
|
|
|
DAY0 .EQ 4 day 0 was a thursday
|
2016-08-30 20:26:19 +00:00
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
* K.TimeYA get System Time
|
2016-09-05 16:00:11 +00:00
|
|
|
|
* In :
|
2016-10-14 15:39:49 +00:00
|
|
|
|
* Y,A = PTR to S.TIME
|
2016-09-05 16:00:11 +00:00
|
|
|
|
* Out :
|
2016-10-14 15:39:49 +00:00
|
|
|
|
* S.TIME filled with System date/time
|
2016-09-05 16:00:11 +00:00
|
|
|
|
*--------------------------------------
|
2017-01-12 17:43:45 +00:00
|
|
|
|
K.TimeYA >STYA ZPPtr2
|
2016-09-05 16:00:11 +00:00
|
|
|
|
>MLICALL MLIGETTIME
|
|
|
|
|
>LDYAI DATELO
|
2017-01-12 17:43:45 +00:00
|
|
|
|
>STYA ZPPtr1
|
2016-09-21 15:20:37 +00:00
|
|
|
|
bra K.PTime2Time.1
|
2016-09-05 16:00:11 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* In :
|
|
|
|
|
* PULLW = Src PDATE/TIME (DWORD)
|
2016-10-14 15:39:49 +00:00
|
|
|
|
* PULLW = Dst PTR To S.TIME
|
2016-09-05 16:00:11 +00:00
|
|
|
|
*--------------------------------------
|
2016-10-21 15:03:41 +00:00
|
|
|
|
K.PTime2Time jsr PullPtr1Ptr2
|
2016-09-05 16:00:11 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.PTime2Time.1 ldy #1
|
2017-01-12 17:43:45 +00:00
|
|
|
|
lda (ZPPtr1),y Get Year
|
2016-09-05 16:00:11 +00:00
|
|
|
|
lsr C is high bit of month
|
2016-09-21 15:20:37 +00:00
|
|
|
|
ldy #S.Time.YEAR
|
2017-01-12 17:43:45 +00:00
|
|
|
|
sta (ZPPtr2),y set year
|
2016-09-21 15:20:37 +00:00
|
|
|
|
sta K.CTime.Year for conputing Century/WDAY later
|
2016-09-05 16:00:11 +00:00
|
|
|
|
|
2017-01-12 17:43:45 +00:00
|
|
|
|
lda (ZPPtr1) Get Month/day
|
2016-09-05 16:00:11 +00:00
|
|
|
|
pha save Day
|
|
|
|
|
ror
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
2016-09-21 15:20:37 +00:00
|
|
|
|
ldy #S.Time.MONTH
|
2017-01-12 17:43:45 +00:00
|
|
|
|
sta (ZPPtr2),y set month
|
2016-09-05 16:00:11 +00:00
|
|
|
|
|
|
|
|
|
pla get back day
|
|
|
|
|
and #$1F
|
|
|
|
|
iny
|
2017-01-12 17:43:45 +00:00
|
|
|
|
sta (ZPPtr2),y set day
|
2016-09-05 16:00:11 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.CTime.Year get back year
|
2016-09-05 16:00:11 +00:00
|
|
|
|
|
2016-09-12 19:46:54 +00:00
|
|
|
|
cmp #69 if before 70 CC,if > 70, CS
|
|
|
|
|
lda #0
|
|
|
|
|
rol get back C in bit 0
|
|
|
|
|
eor #1 toggle C
|
|
|
|
|
adc #19 set date before 1970 -> 20xx
|
2017-01-12 17:43:45 +00:00
|
|
|
|
sta (ZPPtr2) set Century
|
2016-09-21 15:20:37 +00:00
|
|
|
|
sta K.CTime.Century for conputing WDAY later
|
2016-09-05 16:00:11 +00:00
|
|
|
|
|
2016-09-12 19:46:54 +00:00
|
|
|
|
ldy #2
|
2017-01-12 17:43:45 +00:00
|
|
|
|
lda (ZPPtr1),y Get Min
|
2016-09-05 16:00:11 +00:00
|
|
|
|
tax
|
2016-09-12 19:46:54 +00:00
|
|
|
|
iny
|
2017-01-12 17:43:45 +00:00
|
|
|
|
lda (ZPPtr1),y Get Hour
|
2016-09-05 16:00:11 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
ldy #S.Time.HOUR
|
2017-01-12 17:43:45 +00:00
|
|
|
|
sta (ZPPtr2),y set hour
|
2016-09-05 16:00:11 +00:00
|
|
|
|
iny
|
|
|
|
|
txa
|
2017-01-12 17:43:45 +00:00
|
|
|
|
sta (ZPPtr2),y set min
|
2016-09-05 16:00:11 +00:00
|
|
|
|
iny
|
|
|
|
|
lda #0
|
2017-01-12 17:43:45 +00:00
|
|
|
|
sta (ZPPtr2),y set seconds (ProDOS does not provide it)
|
2016-09-05 16:00:11 +00:00
|
|
|
|
|
2016-09-12 19:46:54 +00:00
|
|
|
|
* 1/1/1970 was Thursday...if not leap, add one, if leap add 2
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.ComputeWDAY lda #3 Thursday : 4 (-1 for mod 7)
|
2016-09-12 19:46:54 +00:00
|
|
|
|
pha
|
|
|
|
|
lda #19
|
2016-09-21 15:20:37 +00:00
|
|
|
|
sta K.CTime.DWORD
|
2016-09-12 19:46:54 +00:00
|
|
|
|
lda #70
|
2016-09-21 15:20:37 +00:00
|
|
|
|
sta K.CTime.DWORD+1
|
2016-09-12 19:46:54 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
.1 ldy K.CTime.DWORD
|
|
|
|
|
lda K.CTime.DWORD+1
|
2016-09-12 19:46:54 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
cpy K.CTime.Century
|
2016-09-12 19:46:54 +00:00
|
|
|
|
bne .2
|
2016-09-21 15:20:37 +00:00
|
|
|
|
cmp K.CTime.Year
|
2016-09-12 19:46:54 +00:00
|
|
|
|
beq .4
|
|
|
|
|
|
2016-09-28 15:34:15 +00:00
|
|
|
|
.2 jsr TIME.IsLeapYearYA CC = Leap
|
2016-09-12 19:46:54 +00:00
|
|
|
|
lda #0
|
|
|
|
|
rol
|
|
|
|
|
eor #1
|
|
|
|
|
lsr
|
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
adc #1
|
|
|
|
|
cmp #7
|
|
|
|
|
bcc .3
|
|
|
|
|
sbc #7 MOD 7
|
|
|
|
|
|
|
|
|
|
.3 pha
|
2016-09-21 15:20:37 +00:00
|
|
|
|
inc K.CTime.DWORD+1
|
|
|
|
|
lda K.CTime.DWORD+1
|
2016-09-12 19:46:54 +00:00
|
|
|
|
cmp #100
|
|
|
|
|
bne .1
|
|
|
|
|
lda #0
|
2016-09-21 15:20:37 +00:00
|
|
|
|
sta K.CTime.DWORD+1
|
|
|
|
|
inc K.CTime.DWORD
|
2016-09-12 19:46:54 +00:00
|
|
|
|
bra .1
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
.4 ldy #S.Time.MONTH
|
2017-01-12 17:43:45 +00:00
|
|
|
|
lda (ZPPtr2),y get month
|
2016-09-12 19:46:54 +00:00
|
|
|
|
tax
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
.5 lda K.StrFTime.MDAY-1,x get day count in this month
|
2016-09-12 19:46:54 +00:00
|
|
|
|
bne .6 february ?
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
ldy K.CTime.Century
|
|
|
|
|
lda K.CTime.Year
|
2016-09-28 15:34:15 +00:00
|
|
|
|
jsr TIME.IsLeapYearYA CC = Leap
|
2016-09-12 19:46:54 +00:00
|
|
|
|
lda #0
|
|
|
|
|
rol
|
|
|
|
|
eor #1
|
|
|
|
|
lsr
|
|
|
|
|
|
|
|
|
|
.6 pla
|
2016-09-21 15:20:37 +00:00
|
|
|
|
adc K.StrFTime.MDAY-1,x
|
2016-09-12 19:46:54 +00:00
|
|
|
|
cmp #7
|
|
|
|
|
bcc .7
|
|
|
|
|
sbc #7
|
|
|
|
|
|
|
|
|
|
.7 pha
|
|
|
|
|
dex
|
|
|
|
|
bne .5
|
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
ldy #S.Time.DAY
|
2017-01-12 17:43:45 +00:00
|
|
|
|
adc (ZPPtr2),y get month (1..31)
|
2016-09-12 19:46:54 +00:00
|
|
|
|
dec adjust range 0.31 for MOD 7
|
|
|
|
|
|
|
|
|
|
.8 cmp #7 MOD 7
|
|
|
|
|
bcc .80
|
|
|
|
|
sbc #7
|
|
|
|
|
bra .8
|
|
|
|
|
|
|
|
|
|
.80 inc adjust range 1..7
|
2016-09-21 15:20:37 +00:00
|
|
|
|
ldy #S.Time.WDAY
|
2017-01-12 17:43:45 +00:00
|
|
|
|
sta (ZPPtr2),y
|
2016-09-12 19:46:54 +00:00
|
|
|
|
|
2016-09-05 16:00:11 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
* K.CTime2Time
|
2016-08-30 20:26:19 +00:00
|
|
|
|
* In :
|
|
|
|
|
* PULLW = Src CTIME DWORD
|
2016-10-14 15:39:49 +00:00
|
|
|
|
* PULLW = Dst PTR To S.TIME
|
2016-08-30 20:26:19 +00:00
|
|
|
|
*--------------------------------------
|
2016-10-21 15:03:41 +00:00
|
|
|
|
K.CTime2Time jsr PullPtr1Ptr2
|
2016-08-31 15:38:48 +00:00
|
|
|
|
|
|
|
|
|
ldy #3
|
|
|
|
|
|
2017-01-12 17:43:45 +00:00
|
|
|
|
.1 lda (ZPPtr1),y
|
2016-09-21 15:20:37 +00:00
|
|
|
|
sta K.CTime.DWORD,y
|
2016-08-31 15:38:48 +00:00
|
|
|
|
dey
|
|
|
|
|
bpl .1
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
stz K.CTime.DivDay
|
|
|
|
|
stz K.CTime.DivDay+1
|
2016-08-31 15:38:48 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
.2 lda K.CTime.DWORD
|
|
|
|
|
sta K.CTime.ModDay
|
2016-08-31 15:38:48 +00:00
|
|
|
|
sec
|
|
|
|
|
sbc #SECSDAY
|
|
|
|
|
pha
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.CTime.DWORD+1
|
|
|
|
|
sta K.CTime.ModDay+1
|
2016-08-31 15:38:48 +00:00
|
|
|
|
sbc /SECSDAY
|
|
|
|
|
pha
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.CTime.DWORD+2
|
|
|
|
|
sta K.CTime.ModDay+2
|
2016-08-31 15:38:48 +00:00
|
|
|
|
sbc #0
|
|
|
|
|
pha
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.CTime.DWORD+3
|
2016-08-31 15:38:48 +00:00
|
|
|
|
sbc #0
|
|
|
|
|
bcc .3 end of DIV/MOD ?
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
sta K.CTime.DWORD+3
|
2017-07-01 13:44:40 +00:00
|
|
|
|
|
|
|
|
|
ldx #2
|
|
|
|
|
|
|
|
|
|
.21 pla
|
|
|
|
|
sta K.CTime.DWORD,x
|
|
|
|
|
dex
|
|
|
|
|
bpl .21
|
2016-08-31 15:38:48 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
inc K.CTime.DivDay
|
2016-08-31 15:38:48 +00:00
|
|
|
|
bne .2
|
2016-09-21 15:20:37 +00:00
|
|
|
|
inc K.CTime.DivDay+1
|
2016-08-31 15:38:48 +00:00
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
.3 pla
|
|
|
|
|
pla
|
|
|
|
|
pla
|
2016-09-21 15:20:37 +00:00
|
|
|
|
stz K.CTime.Div60
|
|
|
|
|
stz K.CTime.Div60+1
|
2016-08-31 15:38:48 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
.4 lda K.CTime.ModDay
|
|
|
|
|
sta K.CTime.Mod
|
2016-08-31 15:38:48 +00:00
|
|
|
|
sec
|
|
|
|
|
sbc #60
|
|
|
|
|
pha
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.CTime.ModDay+1
|
2016-08-31 15:38:48 +00:00
|
|
|
|
sbc #0
|
|
|
|
|
pha
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.CTime.ModDay+2
|
2016-08-31 15:38:48 +00:00
|
|
|
|
sbc #0
|
|
|
|
|
|
|
|
|
|
bcc .5
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
sta K.CTime.ModDay+2
|
2016-08-31 15:38:48 +00:00
|
|
|
|
pla
|
2016-09-21 15:20:37 +00:00
|
|
|
|
sta K.CTime.ModDay+1
|
2016-08-31 15:38:48 +00:00
|
|
|
|
pla
|
2016-09-21 15:20:37 +00:00
|
|
|
|
sta K.CTime.ModDay
|
2016-08-31 15:38:48 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
inc K.CTime.Div60
|
2016-08-31 15:38:48 +00:00
|
|
|
|
bne .4
|
2016-09-21 15:20:37 +00:00
|
|
|
|
inc K.CTime.Div60+1
|
2016-08-31 15:38:48 +00:00
|
|
|
|
bne .4
|
|
|
|
|
|
|
|
|
|
.5 pla
|
|
|
|
|
pla
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.CTime.Mod
|
|
|
|
|
ldy #S.Time.SECOND
|
2017-01-12 17:43:45 +00:00
|
|
|
|
sta (ZPPtr2),y
|
2016-08-31 15:38:48 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
stz K.CTime.Div3600
|
2016-08-31 15:38:48 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
.6 lda K.CTime.Div60
|
|
|
|
|
sta K.CTime.Mod
|
2016-08-31 15:38:48 +00:00
|
|
|
|
sec
|
|
|
|
|
sbc #60
|
|
|
|
|
pha
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.CTime.Div60+1
|
2016-08-31 15:38:48 +00:00
|
|
|
|
sbc #0
|
|
|
|
|
pha
|
|
|
|
|
|
|
|
|
|
bcc .7
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
sta K.CTime.Div60+1
|
2016-08-31 15:38:48 +00:00
|
|
|
|
pla
|
2016-09-21 15:20:37 +00:00
|
|
|
|
sta K.CTime.Div60
|
2016-08-31 15:38:48 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
inc K.CTime.Div3600
|
2016-08-31 15:38:48 +00:00
|
|
|
|
bne .6
|
|
|
|
|
|
|
|
|
|
.7 pla
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.CTime.Mod
|
|
|
|
|
dey ldy #S.Time.MINUTE
|
2017-01-12 17:43:45 +00:00
|
|
|
|
sta (ZPPtr2),y
|
2016-08-31 15:38:48 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.CTime.Div3600
|
|
|
|
|
dey ldy #S.Time.HOUR
|
2017-01-12 17:43:45 +00:00
|
|
|
|
sta (ZPPtr2),y
|
2016-08-31 15:38:48 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.CTime.DivDay WDAY computation : (DivDay + DAY0) mod 7
|
2016-08-30 20:26:19 +00:00
|
|
|
|
clc
|
2016-08-31 15:38:48 +00:00
|
|
|
|
adc #DAY0
|
|
|
|
|
pha
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.CTime.DivDay+1
|
2016-08-31 15:38:48 +00:00
|
|
|
|
adc /DAY0
|
|
|
|
|
eor #$ff
|
|
|
|
|
tax
|
|
|
|
|
pla
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
.8 sta K.CTime.Mod
|
2016-08-31 15:38:48 +00:00
|
|
|
|
sec
|
|
|
|
|
sbc #7
|
|
|
|
|
bcs .8
|
|
|
|
|
inx
|
|
|
|
|
bne .8
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.CTime.Mod
|
|
|
|
|
ldy #S.Time.WDAY
|
2017-01-12 17:43:45 +00:00
|
|
|
|
sta (ZPPtr2),y
|
2016-08-31 15:38:48 +00:00
|
|
|
|
|
|
|
|
|
lda #CENTURY0
|
2016-09-21 15:20:37 +00:00
|
|
|
|
sta K.CTime.Century
|
2016-08-31 15:38:48 +00:00
|
|
|
|
lda #YEAR0
|
2016-09-21 15:20:37 +00:00
|
|
|
|
sta K.CTime.Year
|
2016-09-02 06:09:44 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.CTime2Time.Year
|
|
|
|
|
.1 ldy K.CTime.Century
|
|
|
|
|
lda K.CTime.Year
|
2016-09-28 15:34:15 +00:00
|
|
|
|
jsr TIME.IsLeapYearYA if Leap year CC
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.CTime.DivDay
|
2016-09-01 05:42:28 +00:00
|
|
|
|
sbc #365
|
|
|
|
|
pha
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.CTime.DivDay+1
|
2016-09-01 05:42:28 +00:00
|
|
|
|
sbc /365
|
2016-09-02 06:09:44 +00:00
|
|
|
|
bcc .2
|
2016-08-31 15:38:48 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
sta K.CTime.DivDay+1
|
2016-09-01 05:42:28 +00:00
|
|
|
|
pla
|
2016-09-21 15:20:37 +00:00
|
|
|
|
sta K.CTime.DivDay
|
2016-09-01 05:42:28 +00:00
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
inc K.CTime.Year
|
|
|
|
|
lda K.CTime.Year
|
2016-09-01 05:42:28 +00:00
|
|
|
|
cmp #100
|
2016-09-02 06:09:44 +00:00
|
|
|
|
bne .1
|
2016-09-21 15:20:37 +00:00
|
|
|
|
stz K.CTime.Year
|
|
|
|
|
inc K.CTime.Century
|
2016-09-02 06:09:44 +00:00
|
|
|
|
bne .1
|
2016-09-01 05:42:28 +00:00
|
|
|
|
|
2016-09-02 06:09:44 +00:00
|
|
|
|
.2 pla
|
2016-09-21 15:20:37 +00:00
|
|
|
|
lda K.CTime.Century
|
|
|
|
|
* ldy #S.Time.CENTURY
|
2017-01-12 17:43:45 +00:00
|
|
|
|
sta (ZPPtr2)
|
2016-09-21 15:20:37 +00:00
|
|
|
|
ldy #S.Time.YEAR
|
|
|
|
|
lda K.CTime.Year
|
2017-01-12 17:43:45 +00:00
|
|
|
|
sta (ZPPtr2),y
|
2016-09-01 05:42:28 +00:00
|
|
|
|
|
2016-09-02 06:09:44 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2016-09-01 05:42:28 +00:00
|
|
|
|
*--------------------------------------
|
2016-09-12 19:46:54 +00:00
|
|
|
|
* In :
|
|
|
|
|
* Y = Century
|
|
|
|
|
* A = Year (0..99)
|
2016-09-01 05:42:28 +00:00
|
|
|
|
* if (year mod 400 = 0)
|
|
|
|
|
* or
|
|
|
|
|
* if not (year mod 100 = 0) and (year mod 4 = 0)
|
2016-09-12 19:46:54 +00:00
|
|
|
|
* Out :
|
|
|
|
|
* CC = Leap
|
|
|
|
|
* CS = Not Leap
|
2016-08-31 15:38:48 +00:00
|
|
|
|
*--------------------------------------
|
2016-09-28 15:34:15 +00:00
|
|
|
|
TIME.IsLeapYearYA
|
|
|
|
|
cmp #0 Year = 00 ?
|
2016-09-01 05:42:28 +00:00
|
|
|
|
bne .1 no
|
|
|
|
|
|
|
|
|
|
tya year = 00, get century in a
|
|
|
|
|
and #$3 mod 4 = 0 ?
|
|
|
|
|
beq .9 leap year
|
|
|
|
|
|
|
|
|
|
.8 sec not leap
|
|
|
|
|
rts
|
2016-08-31 15:38:48 +00:00
|
|
|
|
|
2016-09-01 05:42:28 +00:00
|
|
|
|
.1 and #$3 mod 4 = 0 ?
|
|
|
|
|
bne .8
|
|
|
|
|
|
|
|
|
|
.9 clc Leap
|
2016-08-31 15:38:48 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-09-28 15:34:15 +00:00
|
|
|
|
K.StrFTime.MDAY .DA #3,#0,#3,#2,#3,#2,#3,#3,#2,#3,#2,#3
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.CTime.DWORD .BS 4
|
|
|
|
|
K.CTime.DivDay .BS 2
|
|
|
|
|
K.CTime.ModDay .BS 3
|
|
|
|
|
K.CTime.Div60 .BS 2
|
|
|
|
|
K.CTime.Div3600 .BS 1
|
|
|
|
|
K.CTime.Mod .BS 1
|
|
|
|
|
K.CTime.Century .BS 1
|
|
|
|
|
K.CTime.Year .BS 1
|
2016-08-30 20:26:19 +00:00
|
|
|
|
MAN
|
2017-03-29 15:48:15 +00:00
|
|
|
|
SAVE /A2OSX.SRC/SYS/KERNEL.S.Time
|
|
|
|
|
LOAD /A2OSX.SRC/SYS/KERNEL.S
|
2016-08-30 20:26:19 +00:00
|
|
|
|
ASM
|