A2osX/_Docs/KERNEL.md

73 lines
2.0 KiB
Markdown
Raw Normal View History

2016-10-22 08:33:22 +00:00
*** Auto generated by docgen.cmd ***
2016-10-22 12:35:05 +00:00
#K.FOPEN
2016-10-22 19:47:40 +00:00
+ Open a file
2016-10-22 12:35:05 +00:00
##In :
2016-10-22 19:47:40 +00:00
+ PUSHW = AUXTYPE
+ PUSHB = TYPE
+ PUSHB = MODE
+ SYS.FOPEN.R : if R and exists -> ERROR
+ SYS.FOPEN.W : if W and exists -> CREATE
+ SYS.FOPEN.A : Append
+ SYS.FOPEN.T : Open/Append in Text mode
+ SYS.FOPEN.X : Create if not exists
+ PUSHW = PATH (PSTR)
2016-10-22 12:35:05 +00:00
##Out :
2016-10-22 19:47:40 +00:00
+ CC : A = hFILE
+ CS : A = EC
#K.NewPStrYA
Create a new copy of PSTR
##In:
+ Y,A = PTR to buffer
##Out:
+ CC : success
+ Y,A = PTR to String
+ X = hMem (PSTRING)
+ CS : error
+ A = SYS error code
2016-10-22 09:06:51 +00:00
#K.PStrMatch
2016-10-22 19:47:40 +00:00
Compare a String against pattern
2016-10-22 09:06:51 +00:00
##In:
2016-10-22 19:47:40 +00:00
+ PUSHW = PTR to Pattern (e.g. '*test?.txt')
+ PUSHW = PTR to Src String
2016-10-22 09:06:51 +00:00
##Out:
2016-10-22 19:47:40 +00:00
+ CC : match
+ CS : no match
#K.PStrUprYA/K.PStrLwrYA
Convert string to UPPERCASE/lowercase
2016-10-22 08:33:22 +00:00
##In:
2016-10-22 19:47:40 +00:00
+ Y,A = PTR to String (PSTRING)
2016-10-22 08:33:22 +00:00
##Out:
2016-10-22 19:47:40 +00:00
+ Uppercased/lowercased String in Buffer
2016-10-21 21:11:55 +00:00
#K.PStrFTime
2016-10-22 08:33:22 +00:00
Convert S.TIME struct to PSTR
2016-10-21 21:11:55 +00:00
##In :
2016-10-22 19:47:40 +00:00
+ PUSHW = Dst PTR To PSTR Buf
+ PUSHW = 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
+ PUSHW = Src PTR To S.Time
2016-10-21 21:11:55 +00:00
##Out :
2016-10-22 19:47:40 +00:00
+ none. always succeed.
2016-10-22 08:33:22 +00:00
#K.PStr2StrArrayYA
2016-10-22 19:47:40 +00:00
Convert a PSTR (e.g. : command Line) to a Array of PSTRs (Args[])
2016-10-22 08:33:22 +00:00
##In :
2016-10-22 19:47:40 +00:00
+ Y,A = PTR to String
2016-10-22 08:33:22 +00:00
##Out :
2016-10-22 19:47:40 +00:00
+ CC : success
+ Y,A = PTR to StrArray
+ X = hMem
+ CS : error
+ A = SYS error code