From 7973f024610c807b869fcc35da5a36a45a6aea42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20GIBERT?= Date: Tue, 30 Aug 2016 22:26:19 +0200 Subject: [PATCH] TODO:Time API (developers wanted, i said ;-) --- INC/A2osX.I.txt | 12 ++++++++- INC/LIBSTDIO.I.txt | 19 ------------- LIB/LIBSTDIO.S.txt | 41 ---------------------------- SYS/KERNEL.S.TIME.txt | 63 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+), 61 deletions(-) delete mode 100644 INC/LIBSTDIO.I.txt delete mode 100644 LIB/LIBSTDIO.S.txt create mode 100644 SYS/KERNEL.S.TIME.txt diff --git a/INC/A2osX.I.txt b/INC/A2osX.I.txt index 5e910895..ba1daaf6 100644 --- a/INC/A2osX.I.txt +++ b/INC/A2osX.I.txt @@ -512,7 +512,17 @@ S.LISTDIR.hPATTERN .EQ 15 Pattern for file filtering * S.LISTDIR.SIZE .EQ 16 *-------------------------------------- -* for +S.TIME.YEAR .EQ 0 WORD +S.TIME.MONTH .EQ 2 1..12 +S.TIME.DAY .EQ 3 1..31 +S.TIME.HOUR .EQ 4 0..23 +S.TIME.MINUTE .EQ 5 0..59 +S.TIME.SECOND .EQ 6 0..61 +S.TIME.WDAY .EQ 7 1..7 +* +S.TIME .EQ 8 +*-------------------------------------- +* S.STAT *-------------------------------------- S.STAT.MODE .EQ 0 S.STAT.MODE.XO .EQ $0001 diff --git a/INC/LIBSTDIO.I.txt b/INC/LIBSTDIO.I.txt deleted file mode 100644 index b15aae23..00000000 --- a/INC/LIBSTDIO.I.txt +++ /dev/null @@ -1,19 +0,0 @@ -PR#3 -PREFIX /A2OSX.SRC -NEW -INC 1 -AUTO 6 - .LIST OFF - .OP 65C02 -*-------------------------------------- -LIBSTDIO.ADDPF .EQ 4 -LIBSTDIO.REMOVEPF .EQ 6 - -LIBSTDIO.FOPEN .EQ 4 -LIBSTDIO.FCLOSE .EQ 6 -LIBSTDIO.FREAD .EQ 8 -LIBSTDIO.FWRITE .EQ 10 -*-------------------------------------- -MAN -SAVE INC/LIBSTDIO.I - diff --git a/LIB/LIBSTDIO.S.txt b/LIB/LIBSTDIO.S.txt deleted file mode 100644 index 8c5062cc..00000000 --- a/LIB/LIBSTDIO.S.txt +++ /dev/null @@ -1,41 +0,0 @@ -PR#3 -PREFIX /A2OSX.SRC -NEW -INC 1 -AUTO 6 - .LIST OFF - .OP 65C02 - .OR $2000 - .TF /A2OSX.BOOT/LIB/LIBSTDIO.O -*-------------------------------------- - .INB INC/MACROS.I - .INB INC/A2OSX.I - .INB INC/LIBSTDIO.I -*-------------------------------------- -* File Header (16 Bytes) -*-------------------------------------- -CS.START cld - jmp (.1,x) - .DA #$61 6502,Level 1 (65c02) - .DA #1 BIN Layout Version 1 - .DA 0 - .DA CS.END-CS.START - .DA 0 - .DA 0 - .DA 0 -*-------------------------------------- -* Relocation Table -*-------------------------------------- -.1 .DA LIB.LOAD - .DA LIB.UNLOAD -*-------------------------------------- - .DA 0 -*-------------------------------------- -LIB.LOAD -LIB.UNLOAD clc - rts -*-------------------------------------- -CS.END -MAN -SAVE LIB/LIBSTDIO.S -ASM diff --git a/SYS/KERNEL.S.TIME.txt b/SYS/KERNEL.S.TIME.txt new file mode 100644 index 00000000..32188fcd --- /dev/null +++ b/SYS/KERNEL.S.TIME.txt @@ -0,0 +1,63 @@ +PR#3 +PREFIX /A2OSX.SRC +NEW +INC 1 +AUTO 6 + .LIST OFF +*-------------------------------------- +* S.TimeYA get System Time +* In : +* Y,A = PTR to S.TIME +* Out : +* S.TIME filled with ProDOS MLI date/time +*-------------------------------------- +S.TimeYA + clc + rts +*-------------------------------------- +* S.CTime2Time +* In : +* PULLW = Src CTIME DWORD +* PULLW = Dst PTR To S.TIME +*-------------------------------------- +S.CTime2Time + clc + rts +*-------------------------------------- +* In : +* PULLW = Src PDATE +* PULLW = Src PTIME +* PULLW = Dst PTR To S.TIME +*-------------------------------------- +S.PTime2Time + clc + rts +*-------------------------------------- +* S.StrFTime +* In : +* PULLW = Src PTR To S.TIME +* PULLW = Src PTR To Format String +* %a Abbreviated weekday name : Thu +* %A Full weekday name : Thursday +* %b Abbreviated month name : Aug +* %B Full month name : August +* %d Day of the month, zero-padded (01-31) +* %H Hour in 24h format (00-23) 14 +* %I Hour in 12h format (01-12) 02 +* %m Month as a decimal number (01-12) 08 +* %M Minute (00-59) 55 +* %p AM or PM designation PM +* %S Second (00-61) 02 +* %w Weekday as a decimal number with Sunday as 0 (0-6) +* %y Year, last two digits (00-99) +* %Y Year four digits 2001 +* PULLW = Dst PSTR Buffer +*-------------------------------------- +S.StrFTime + clc + rts +*-------------------------------------- +MAN +SAVE SYS/KERNEL.S.TIME +LOAD SYS/KERNEL.S +ASM