mirror of
https://github.com/A2osX/A2osX.git
synced 2025-02-20 15:29:07 +00:00
Kernel 0.9.1 : Code reorganization & move to CSTR
This commit is contained in:
parent
fc3fc7e817
commit
227a769d92
215
.Docs/KERNEL.md
215
.Docs/KERNEL.md
@ -80,19 +80,6 @@ Returns argument count in the process command line.
|
|||||||
## Out:
|
## Out:
|
||||||
+ none, always succeed.
|
+ none, always succeed.
|
||||||
|
|
||||||
# NewPStrYA
|
|
||||||
Create a new copy of PSTR
|
|
||||||
|
|
||||||
## In:
|
|
||||||
+ Y,A = PTR to buffer
|
|
||||||
|
|
||||||
## Out:
|
|
||||||
+ CC : success
|
|
||||||
+ Y,A = PTR to String
|
|
||||||
+ X = hMem (PSTR)
|
|
||||||
+ CS : error
|
|
||||||
+ A = SYS error code
|
|
||||||
|
|
||||||
# ExpandPStr.YA
|
# ExpandPStr.YA
|
||||||
|
|
||||||
## In:
|
## In:
|
||||||
@ -206,6 +193,19 @@ And return, if found, the full path to it.
|
|||||||
+ PUSHW = GID
|
+ PUSHW = GID
|
||||||
+ PUSHW = PATH
|
+ PUSHW = PATH
|
||||||
|
|
||||||
|
# NewPStrYA
|
||||||
|
Create a new copy of PSTR
|
||||||
|
|
||||||
|
## In:
|
||||||
|
+ Y,A = PTR to buffer
|
||||||
|
|
||||||
|
## Out:
|
||||||
|
+ CC : success
|
||||||
|
+ Y,A = PTR to String
|
||||||
|
+ X = hMem (PSTR)
|
||||||
|
+ CS : error
|
||||||
|
+ A = SYS error code
|
||||||
|
|
||||||
# GetMem
|
# GetMem
|
||||||
|
|
||||||
## In:
|
## In:
|
||||||
@ -329,7 +329,7 @@ Return information about a file
|
|||||||
|
|
||||||
## In :
|
## In :
|
||||||
+ PUSHW = PTR to S.STAT buffer
|
+ PUSHW = PTR to S.STAT buffer
|
||||||
+ PUSHW = PTR to Filename (PSTR)
|
+ PUSHW = PTR to Filename (C-String)
|
||||||
|
|
||||||
## Out :
|
## Out :
|
||||||
|
|
||||||
@ -353,17 +353,6 @@ return a hFile for a given Device Name
|
|||||||
+ CC = OK, CS = ERROR
|
+ CC = OK, CS = ERROR
|
||||||
+ A = hFILE
|
+ A = hFILE
|
||||||
|
|
||||||
# MkNod.A
|
|
||||||
return a hFile for a given Socket
|
|
||||||
|
|
||||||
## IN:
|
|
||||||
+ A=hSocket
|
|
||||||
|
|
||||||
## OUT:
|
|
||||||
+ CC = OK, CS = ERROR
|
|
||||||
+ X = hFILE
|
|
||||||
+ Y,A = pFILE
|
|
||||||
|
|
||||||
# MKFIFO
|
# MKFIFO
|
||||||
return a S.FILE to a new FIFO
|
return a S.FILE to a new FIFO
|
||||||
|
|
||||||
@ -373,6 +362,83 @@ return a S.FILE to a new FIFO
|
|||||||
+ CC = OK, CS = ERROR
|
+ CC = OK, CS = ERROR
|
||||||
+ A = hFILE
|
+ A = hFILE
|
||||||
|
|
||||||
|
# FPutC.AY
|
||||||
|
Print A (char) to File
|
||||||
|
|
||||||
|
## In:
|
||||||
|
+ A : char to print
|
||||||
|
+ Y = hFILE
|
||||||
|
|
||||||
|
## Out:
|
||||||
|
+ CC = success
|
||||||
|
|
||||||
|
# PutChar.A
|
||||||
|
Print A (char) to StdOut
|
||||||
|
|
||||||
|
## In:
|
||||||
|
+ A : char to print
|
||||||
|
|
||||||
|
## Out:
|
||||||
|
+ CC = success
|
||||||
|
|
||||||
|
# GetChar
|
||||||
|
Get char from StdIn
|
||||||
|
|
||||||
|
## In:
|
||||||
|
+ none.
|
||||||
|
|
||||||
|
## Out:
|
||||||
|
+ CC = success
|
||||||
|
+ A = char
|
||||||
|
|
||||||
|
# GetC.A
|
||||||
|
Get char from File
|
||||||
|
|
||||||
|
## In:
|
||||||
|
+ A = hFILE
|
||||||
|
|
||||||
|
## Out:
|
||||||
|
+ CC = success
|
||||||
|
+ A = char
|
||||||
|
|
||||||
|
# FPutS
|
||||||
|
Write String to FILE
|
||||||
|
|
||||||
|
## In:
|
||||||
|
+ PUSHW : CPtr
|
||||||
|
+ PUSHB : hFILE
|
||||||
|
|
||||||
|
## Out:
|
||||||
|
+ CC = success
|
||||||
|
|
||||||
|
# PutS.YA
|
||||||
|
Write String to StdOut
|
||||||
|
|
||||||
|
## In:
|
||||||
|
+ Y,A : CPtr
|
||||||
|
|
||||||
|
## Out:
|
||||||
|
+ CC = success
|
||||||
|
|
||||||
|
# FGetS
|
||||||
|
Read String From FILE
|
||||||
|
|
||||||
|
## In:
|
||||||
|
+ PUSHW : CPtr
|
||||||
|
+ PUSHB : hFILE
|
||||||
|
|
||||||
|
## Out:
|
||||||
|
+ CC = success
|
||||||
|
|
||||||
|
# GetS.YA
|
||||||
|
Read String From StdIn
|
||||||
|
|
||||||
|
## In:
|
||||||
|
+ Y,A : CPtr
|
||||||
|
|
||||||
|
## Out:
|
||||||
|
+ CC = success
|
||||||
|
|
||||||
# FOpen
|
# FOpen
|
||||||
Open a file
|
Open a file
|
||||||
|
|
||||||
@ -481,83 +547,6 @@ Rename a file
|
|||||||
|
|
||||||
## Out :
|
## Out :
|
||||||
|
|
||||||
# FPutC.AY
|
|
||||||
Print A (char) to File
|
|
||||||
|
|
||||||
## In:
|
|
||||||
+ A : char to print
|
|
||||||
+ Y = hFILE
|
|
||||||
|
|
||||||
## Out:
|
|
||||||
+ CC = success
|
|
||||||
|
|
||||||
# PutChar.A
|
|
||||||
Print A (char) to StdOut
|
|
||||||
|
|
||||||
## In:
|
|
||||||
+ A : char to print
|
|
||||||
|
|
||||||
## Out:
|
|
||||||
+ CC = success
|
|
||||||
|
|
||||||
# GetChar
|
|
||||||
Get char from StdIn
|
|
||||||
|
|
||||||
## In:
|
|
||||||
+ none.
|
|
||||||
|
|
||||||
## Out:
|
|
||||||
+ CC = success
|
|
||||||
+ A = char
|
|
||||||
|
|
||||||
# GetC.A
|
|
||||||
Get char from File
|
|
||||||
|
|
||||||
## In:
|
|
||||||
+ A = hFILE
|
|
||||||
|
|
||||||
## Out:
|
|
||||||
+ CC = success
|
|
||||||
+ A = char
|
|
||||||
|
|
||||||
# FPutS
|
|
||||||
Write String to FILE
|
|
||||||
|
|
||||||
## In:
|
|
||||||
+ PUSHW : CPtr
|
|
||||||
+ PUSHB : hFILE
|
|
||||||
|
|
||||||
## Out:
|
|
||||||
+ CC = success
|
|
||||||
|
|
||||||
# PutS.YA
|
|
||||||
Write String to StdOut
|
|
||||||
|
|
||||||
## In:
|
|
||||||
+ Y,A : CPtr
|
|
||||||
|
|
||||||
## Out:
|
|
||||||
+ CC = success
|
|
||||||
|
|
||||||
# FGetS
|
|
||||||
Read String From FILE
|
|
||||||
|
|
||||||
## In:
|
|
||||||
+ PUSHW : CPtr
|
|
||||||
+ PUSHB : hFILE
|
|
||||||
|
|
||||||
## Out:
|
|
||||||
+ CC = success
|
|
||||||
|
|
||||||
# GetS.YA
|
|
||||||
Read String From StdIn
|
|
||||||
|
|
||||||
## In:
|
|
||||||
+ Y,A : CPtr
|
|
||||||
|
|
||||||
## Out:
|
|
||||||
+ CC = success
|
|
||||||
|
|
||||||
# SScanF
|
# SScanF
|
||||||
Scan a PStr (in progress)
|
Scan a PStr (in progress)
|
||||||
|
|
||||||
@ -618,8 +607,26 @@ FPrintF.YA :
|
|||||||
+ %011s : 'ABCDEFGH000'
|
+ %011s : 'ABCDEFGH000'
|
||||||
+ %2f : '3.14'
|
+ %2f : '3.14'
|
||||||
|
|
||||||
# AToI
|
# AToF
|
||||||
Convert String to 32 bit int
|
Convert String to 40 bits Float
|
||||||
|
|
||||||
|
## In:
|
||||||
|
+ PUSHW PTR to target buffer (5 Bytes)
|
||||||
|
+ PUSHW Source String (PSTR)
|
||||||
|
|
||||||
|
## Out:
|
||||||
|
|
||||||
|
# AToI.YA
|
||||||
|
Convert String to 16 bits int
|
||||||
|
|
||||||
|
## In:
|
||||||
|
+ Y,A = Source String (C-String)
|
||||||
|
|
||||||
|
## Out:
|
||||||
|
+ Y,A = Int
|
||||||
|
|
||||||
|
# AToL
|
||||||
|
Convert String to 32 bits int
|
||||||
|
|
||||||
## In:
|
## In:
|
||||||
+ PUSHW PTR to target buffer DWORD
|
+ PUSHW PTR to target buffer DWORD
|
||||||
|
Loading…
x
Reference in New Issue
Block a user