A2osX/_Docs/KERNEL.md

95 lines
2.2 KiB
Markdown
Raw Normal View History

2016-10-22 20:48:45 +00:00
*** Auto generated by docgen.cmd ***
2016-10-22 20:47:32 +00:00
#FOpen
2016-10-22 20:48:45 +00:00
Open a file
2016-10-22 20:47:32 +00:00
##In :
2016-10-22 20:48:45 +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
2016-10-22 20:46:04 +00:00
+ PUSHW = PATH (PSTR)
2016-10-22 20:48:45 +00:00
##Out :
+ CC : A = hFILE
2016-10-22 20:45:19 +00:00
+ CS : A = EC
2016-10-22 20:48:45 +00:00
#FCloseA
Close a file
##In :
+ A = hFILE
##Out :
2016-10-22 20:23:48 +00:00
#FRead
Read bytes from file
##In :
+ PULLB = hFILE
+ PULLW = Bytes To Read
+ PULLW = Dest Ptr
##Out :
+ Y,A = Bytes Read
#FWrite
##In :
+ PULLB = hFILE
+ PULLW = Bytes To Write
+ PULLW = Src Ptr
#Out :
+ Y,A = Bytes Written
#NewPStrYA
2016-10-22 19:47:40 +00:00
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 20:23:48 +00:00
#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
2016-10-22 20:23:48 +00:00
#PStrUprYA/PStrLwrYA
2016-10-22 19:47:40 +00:00
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-22 20:23:48 +00:00
#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