2017-12-22 21:24:30 +00:00
|
|
|
|
NEW
|
2019-05-25 19:24:07 +00:00
|
|
|
|
AUTO 3,1
|
2017-09-22 15:25:21 +00:00
|
|
|
|
*/--------------------------------------
|
2018-06-18 06:22:50 +00:00
|
|
|
|
* # Time
|
|
|
|
|
* Get System Time in Buffer
|
2018-06-18 08:44:02 +00:00
|
|
|
|
* ## C
|
2020-01-18 19:37:32 +00:00
|
|
|
|
* `int time (S.TIME* timer);`
|
2018-10-04 15:30:14 +00:00
|
|
|
|
* ## ASM
|
2020-01-18 19:37:32 +00:00
|
|
|
|
* `>PUSHW timer`
|
2018-10-11 15:23:06 +00:00
|
|
|
|
* `>SYSCALL time`
|
|
|
|
|
* ## RETURN VALUE
|
2018-06-18 06:22:50 +00:00
|
|
|
|
* S.TIME filled with System date/time
|
2017-09-22 15:25:21 +00:00
|
|
|
|
*\--------------------------------------
|
2020-01-18 19:37:32 +00:00
|
|
|
|
K.Time >PULLW FORPNT
|
2016-09-05 16:00:11 +00:00
|
|
|
|
>MLICALL MLIGETTIME
|
|
|
|
|
>LDYAI DATELO
|
2020-01-18 19:37:32 +00:00
|
|
|
|
>STYA TXTPTR
|
2020-01-21 07:34:32 +00:00
|
|
|
|
ldx #SYS.PTime2Time
|
2019-10-26 14:33:37 +00:00
|
|
|
|
|
2020-01-21 07:34:32 +00:00
|
|
|
|
bra TIME.JMP
|
2017-08-24 06:47:31 +00:00
|
|
|
|
*/--------------------------------------
|
|
|
|
|
* # StrFTime
|
2018-06-18 06:22:50 +00:00
|
|
|
|
* ## C
|
2017-08-24 06:47:31 +00:00
|
|
|
|
* Convert S.TIME struct to CSTR
|
2020-01-21 11:06:59 +00:00
|
|
|
|
* `void strftime (char* str, const char* format, const struct S.TIME* timeptr );`
|
2018-06-18 06:22:50 +00:00
|
|
|
|
* ## ASM
|
2020-01-21 11:06:59 +00:00
|
|
|
|
* `>PUSHW str`
|
2020-01-18 19:37:32 +00:00
|
|
|
|
* `>PUSHW format`
|
2018-06-18 08:44:02 +00:00
|
|
|
|
* + %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
|
2020-01-20 07:23:51 +00:00
|
|
|
|
* `>PUSHW timeptr`
|
2018-10-11 15:23:06 +00:00
|
|
|
|
* `>SYSCALL strftime`
|
|
|
|
|
* ## RETURN VALUE
|
2017-08-24 06:47:31 +00:00
|
|
|
|
* none. always succeed.
|
|
|
|
|
*\--------------------------------------
|
2020-01-21 11:06:59 +00:00
|
|
|
|
K.StrFTime >PULLW ZPPtr3 S.TIME
|
|
|
|
|
>PULLW TXTPTR format
|
|
|
|
|
>PULLW FORPNT str
|
|
|
|
|
bra TIME.JMP
|
2020-01-21 07:34:32 +00:00
|
|
|
|
*/--------------------------------------
|
|
|
|
|
* # PTime2Time
|
|
|
|
|
* Convert ProDOS Time To S.TIME
|
|
|
|
|
* ## C
|
|
|
|
|
* `int PTime2Time (long* ptime, S.TIME* timer);`
|
|
|
|
|
* ## ASM
|
|
|
|
|
* `>PUSHW ptime`
|
|
|
|
|
* `>PUSHW timer`
|
|
|
|
|
* `>SYSCALL PTime2Time`
|
|
|
|
|
* ## RETURN VALUE
|
|
|
|
|
*\--------------------------------------
|
|
|
|
|
K.PTime2Time
|
|
|
|
|
*/--------------------------------------
|
|
|
|
|
* # CTime2Time
|
|
|
|
|
* Convert CTime Time To S.TIME
|
|
|
|
|
* ## C
|
|
|
|
|
* `int CTime2Time (long* ctime, S.TIME* timer);`
|
|
|
|
|
* ## ASM
|
|
|
|
|
* `>PUSHW ctime`
|
|
|
|
|
* `>PUSHW timer`
|
|
|
|
|
* `>SYSCALL CTime2Time`
|
|
|
|
|
* ## RETURN VALUE
|
|
|
|
|
*\--------------------------------------
|
2020-01-21 11:06:59 +00:00
|
|
|
|
K.CTime2Time >PULLW FORPNT S.TIME
|
|
|
|
|
>PULLW TXTPTR ptime/ctime
|
2020-01-21 07:34:32 +00:00
|
|
|
|
|
|
|
|
|
TIME.JMP sta SETREADAUX
|
|
|
|
|
sta SETWRITEAUX
|
|
|
|
|
jsr .1
|
|
|
|
|
sta CLRREADAUX
|
|
|
|
|
sta CLRWRITEAUX
|
2017-08-24 06:47:31 +00:00
|
|
|
|
rts
|
2020-01-21 07:34:32 +00:00
|
|
|
|
|
|
|
|
|
.1 jmp (.2-SYS.StrFTime,x)
|
|
|
|
|
.2 .DA K.StrFTime.I
|
|
|
|
|
.DA K.PTime2Time.I
|
|
|
|
|
.DA K.CTime2Time.I
|
2017-08-24 06:47:31 +00:00
|
|
|
|
*--------------------------------------
|
2016-08-30 20:26:19 +00:00
|
|
|
|
MAN
|
2018-11-17 17:17:13 +00:00
|
|
|
|
SAVE USR/SRC/SYS/KERNEL.S.TIME
|
|
|
|
|
LOAD USR/SRC/SYS/KERNEL.S
|
2016-08-30 20:26:19 +00:00
|
|
|
|
ASM
|