mirror of
https://github.com/A2osX/A2osX.git
synced 2024-06-07 01:29:33 +00:00
Kernel 0.93++
This commit is contained in:
parent
262c280386
commit
52c9167119
|
@ -30,8 +30,8 @@ Expand String and convert to StrV List
|
||||||
short int arg2argv(char* args, char* argv[])
|
short int arg2argv(char* args, char* argv[])
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
`>PUSHW args`
|
|
||||||
`>PUSHW argv`
|
`>PUSHW argv`
|
||||||
|
`>LDYA args`
|
||||||
`>SYSCALL Arg2ArgV`
|
`>SYSCALL Arg2ArgV`
|
||||||
|
|
||||||
## RETURN VALUE
|
## RETURN VALUE
|
||||||
|
@ -111,7 +111,7 @@ Create a hDEV
|
||||||
`int hDIR opendir (const char * dirpath);`
|
`int hDIR opendir (const char * dirpath);`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
`>PUSHW dirpath`
|
`>LDYA dirpath`
|
||||||
`>SYSCALL opendir`
|
`>SYSCALL opendir`
|
||||||
|
|
||||||
## RETURN VALUE
|
## RETURN VALUE
|
||||||
|
@ -150,10 +150,25 @@ Create a hDEV
|
||||||
## RETURN VALUE
|
## RETURN VALUE
|
||||||
none, always succeed.
|
none, always succeed.
|
||||||
|
|
||||||
|
# Expand
|
||||||
|
|
||||||
|
## C
|
||||||
|
`char *expand(const char *str, char *expanded);`
|
||||||
|
|
||||||
|
## ASM
|
||||||
|
**In:**
|
||||||
|
`>PUSHW str`
|
||||||
|
`>PUSHW expanded`
|
||||||
|
`>SYSCALL expand`
|
||||||
|
|
||||||
|
## RETURN VALUE
|
||||||
|
Y,A = PTR to Expanded String
|
||||||
|
X = hMem to Expanded String (C-String)
|
||||||
|
|
||||||
# SetEnv
|
# SetEnv
|
||||||
Change or add an environment variable
|
Change or add an environment variable
|
||||||
|
|
||||||
## C / CSH
|
## C
|
||||||
`int setenv(const char *name, const char *value);`
|
`int setenv(const char *name, const char *value);`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
|
@ -168,7 +183,7 @@ Change or add an environment variable
|
||||||
searches the environment list to find the environment variable name,
|
searches the environment list to find the environment variable name,
|
||||||
and returns a pointer to the corresponding value string.
|
and returns a pointer to the corresponding value string.
|
||||||
|
|
||||||
## C / CSH
|
## C
|
||||||
`char *getenv(const char *name, char *value);`
|
`char *getenv(const char *name, char *value);`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
|
@ -184,7 +199,7 @@ and returns a pointer to the corresponding value string.
|
||||||
# PutEnv
|
# PutEnv
|
||||||
Change or add an environment variable, string is 'NAME=VALUE'
|
Change or add an environment variable, string is 'NAME=VALUE'
|
||||||
|
|
||||||
## C / CSH
|
## C
|
||||||
`int putenv(char *string);`
|
`int putenv(char *string);`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
|
@ -197,7 +212,7 @@ Change or add an environment variable, string is 'NAME=VALUE'
|
||||||
# UnsetEnv
|
# UnsetEnv
|
||||||
Remove an environment variable
|
Remove an environment variable
|
||||||
|
|
||||||
## C / CSH
|
## C
|
||||||
`int unsetenv(const char *name);`
|
`int unsetenv(const char *name);`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
|
@ -215,8 +230,8 @@ Change The type of a ProDOS File
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
**In:**
|
**In:**
|
||||||
`>PUSHW filepath`
|
`>PUSHBI filetype`
|
||||||
`>PUSHB filetype`
|
`>LDYA filepath`
|
||||||
`>SYSCALL chtyp`
|
`>SYSCALL chtyp`
|
||||||
|
|
||||||
## RETURN VALUE
|
## RETURN VALUE
|
||||||
|
@ -424,10 +439,10 @@ Y,A = PTR to MemBlock
|
||||||
|
|
||||||
# LoadStkObj
|
# LoadStkObj
|
||||||
Load a file in AUX memory (Stock Objects)
|
Load a file in AUX memory (Stock Objects)
|
||||||
PUSHW = PATH (Handled by....
|
PUSHW = AUXTYPE (Handled by....
|
||||||
PUSHB = MODE ...
|
|
||||||
PUSHB = TYPE ...
|
PUSHB = TYPE ...
|
||||||
PUSHW = AUXTYPE ...FOpen)
|
PUSHB = MODE ...
|
||||||
|
LDYA = PATH ...FOpen)
|
||||||
|
|
||||||
## RETURN VALUE
|
## RETURN VALUE
|
||||||
Y,A = File Length
|
Y,A = File Length
|
||||||
|
@ -450,8 +465,8 @@ Load a file in AUX memory (Stock Objects)
|
||||||
|
|
||||||
# ExecL
|
# ExecL
|
||||||
|
|
||||||
## C / CSH
|
## C
|
||||||
`int execl(const char *cmdline, short int flags);`
|
`int execl(const char* cmdline, short int flags);`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
`>PUSHW cmdline`
|
`>PUSHW cmdline`
|
||||||
|
@ -463,12 +478,12 @@ A = Child PSID
|
||||||
|
|
||||||
# ExecV
|
# ExecV
|
||||||
|
|
||||||
## C / CSH
|
## C
|
||||||
`int execv(const char* argv[], short int flags);`
|
`int execv(const char* argv[], short int flags);`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
`>PUSHW argv`
|
|
||||||
`>PUSHB flags`
|
`>PUSHB flags`
|
||||||
|
`>LDYA argv`
|
||||||
`>SYSCALL execv`
|
`>SYSCALL execv`
|
||||||
|
|
||||||
## RETURN VALUE
|
## RETURN VALUE
|
||||||
|
@ -477,7 +492,7 @@ A = Child PSID
|
||||||
# Fork
|
# Fork
|
||||||
|
|
||||||
## C
|
## C
|
||||||
`short int fork();`
|
`short nt fork();`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
`>SYSCALL fork`
|
`>SYSCALL fork`
|
||||||
|
@ -689,8 +704,8 @@ Return information about a file
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
**In:**
|
**In:**
|
||||||
`>PUSHW pathname`
|
|
||||||
`>PUSHW statbuf`
|
`>PUSHW statbuf`
|
||||||
|
`>LDYA pathname`
|
||||||
`>SYSCALL stat`
|
`>SYSCALL stat`
|
||||||
|
|
||||||
## RETURN VALUE
|
## RETURN VALUE
|
||||||
|
@ -703,8 +718,8 @@ create a directory
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
**In:**
|
**In:**
|
||||||
`>PUSHW pathname`
|
|
||||||
`>PUSHW mode`
|
`>PUSHW mode`
|
||||||
|
`>LDYA pathname`
|
||||||
`>SYSCALL mkdir`
|
`>SYSCALL mkdir`
|
||||||
|
|
||||||
## RETURN VALUE
|
## RETURN VALUE
|
||||||
|
@ -975,10 +990,9 @@ Open a file
|
||||||
**In:**
|
**In:**
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
`>PUSHW filename`
|
`>PUSHWI auxtype`
|
||||||
`>PUSHB flags`
|
`>PUSHBI ftype`
|
||||||
`>PUSHB ftype`
|
`>PUSHBI flags`
|
||||||
`>PUSHW auxtype`
|
|
||||||
+ O.RDONLY : if R and exists -> ERROR
|
+ O.RDONLY : if R and exists -> ERROR
|
||||||
+ O.WRONLY : if W and exists -> CREATE
|
+ O.WRONLY : if W and exists -> CREATE
|
||||||
+ O.TRUNC : Reset Size To 0
|
+ O.TRUNC : Reset Size To 0
|
||||||
|
@ -994,6 +1008,7 @@ TODO: replace flags/ftype/auxtype with mode="w+,t=TYP,x=AUXTYPE"
|
||||||
+ a+ = O_RDWR | O_CREAT | O_APPEND
|
+ a+ = O_RDWR | O_CREAT | O_APPEND
|
||||||
+ ,t=123 or t=$ff or t=TXT
|
+ ,t=123 or t=$ff or t=TXT
|
||||||
+ ,x=12345 or x=$ffff
|
+ ,x=12345 or x=$ffff
|
||||||
|
`>LDYAI filename`
|
||||||
|
|
||||||
## RETURN VALUE
|
## RETURN VALUE
|
||||||
CC : A = hFILE
|
CC : A = hFILE
|
||||||
|
@ -1106,7 +1121,7 @@ int remove(const char *pathname);
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
**In:**
|
**In:**
|
||||||
`>PUSHW pathname`
|
`>LDYA pathname`
|
||||||
`>SYSCALL remove`
|
`>SYSCALL remove`
|
||||||
|
|
||||||
## RETURN VALUE
|
## RETURN VALUE
|
||||||
|
@ -1119,8 +1134,8 @@ Rename a file
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
**In:**
|
**In:**
|
||||||
`>PUSHW oldpath`
|
|
||||||
`>PUSHW newpath`
|
`>PUSHW newpath`
|
||||||
|
`>LDYA oldpath`
|
||||||
`>SYSCALL rename`
|
`>SYSCALL rename`
|
||||||
|
|
||||||
## RETURN VALUE
|
## RETURN VALUE
|
||||||
|
@ -1203,12 +1218,12 @@ Convert String to 16 bits int
|
||||||
Return the canonicalized absolute pathname
|
Return the canonicalized absolute pathname
|
||||||
|
|
||||||
## C
|
## C
|
||||||
`char *realpath(const char *path, char *resolvedpath);`
|
`unsigned short int realpath (const char* str, char *resolvedpath);`
|
||||||
|
|
||||||
## ASM
|
## ASM
|
||||||
**In:**
|
**In:**
|
||||||
`>PUSHW path`
|
`>PUSHWI resolvedpath`
|
||||||
`>PUSHW resolvedpath`
|
`>LDYA str`
|
||||||
`>SYSCALL realpath`
|
`>SYSCALL realpath`
|
||||||
|
|
||||||
## RETURN VALUE
|
## RETURN VALUE
|
||||||
|
@ -1217,20 +1232,6 @@ CC : success
|
||||||
X = hMem of Full Path
|
X = hMem of Full Path
|
||||||
CS : A = Error Code
|
CS : A = Error Code
|
||||||
|
|
||||||
# Expand
|
|
||||||
|
|
||||||
## C
|
|
||||||
`char *expand(const char *str, char *expanded);`
|
|
||||||
|
|
||||||
## ASM
|
|
||||||
`>PUSHW str`
|
|
||||||
`>PUSHW expanded`
|
|
||||||
`>SYSCALL expand`
|
|
||||||
|
|
||||||
## RETURN VALUE
|
|
||||||
Y,A = PTR to Expanded String
|
|
||||||
X = hMem to Expanded String (C-String)
|
|
||||||
|
|
||||||
# StrLen
|
# StrLen
|
||||||
Returns Length of C-String
|
Returns Length of C-String
|
||||||
|
|
||||||
|
|
|
@ -25,11 +25,6 @@ set SRCDIR=%~dp0..\LIB
|
||||||
set FILTER=LIBBLKDEV.S*.txt
|
set FILTER=LIBBLKDEV.S*.txt
|
||||||
Call :SCAN
|
Call :SCAN
|
||||||
|
|
||||||
set DOCFILE=%~dp0..\.Docs\LIBCRYPT.md
|
|
||||||
set SRCDIR=%~dp0..\LIB
|
|
||||||
set FILTER=LIBCRYPT.S*.txt
|
|
||||||
Call :SCAN
|
|
||||||
|
|
||||||
set DOCFILE=%~dp0..\.Docs\LIBGUI.md
|
set DOCFILE=%~dp0..\.Docs\LIBGUI.md
|
||||||
set SRCDIR=%~dp0..\LIB
|
set SRCDIR=%~dp0..\LIB
|
||||||
set FILTER=LIBGUI.S*.txt
|
set FILTER=LIBGUI.S*.txt
|
||||||
|
|
Loading…
Reference in New Issue
Block a user