2017-12-22 21:24:30 +00:00
|
|
|
|
NEW
|
2019-05-25 19:24:07 +00:00
|
|
|
|
AUTO 3,1
|
2016-10-29 19:58:21 +00:00
|
|
|
|
*/--------------------------------------
|
2017-03-30 16:11:31 +00:00
|
|
|
|
* # SetEnv
|
2018-09-06 15:36:44 +00:00
|
|
|
|
* Change or add an environment variable
|
2020-02-14 07:21:56 +00:00
|
|
|
|
* ## C / CSH
|
2018-09-06 15:36:44 +00:00
|
|
|
|
* `int setenv(const char *name, const char *value);`
|
|
|
|
|
* ## ASM
|
2018-06-14 15:31:36 +00:00
|
|
|
|
* **In:**
|
2020-01-17 07:31:00 +00:00
|
|
|
|
* `>PUSHW name`
|
2018-09-06 15:36:44 +00:00
|
|
|
|
* `>PUSHW value`
|
|
|
|
|
* `>SYSCALL setenv`
|
2018-10-11 15:23:06 +00:00
|
|
|
|
* ## RETURN VALUE
|
2016-10-29 19:58:21 +00:00
|
|
|
|
*\--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
K.SetEnv
|
|
|
|
|
* >PULLW FORPNT value
|
|
|
|
|
* >PULLW TXTPTR name
|
2020-02-03 15:17:34 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
* ldy #S.PS.hENV
|
|
|
|
|
* lda (pPs),y
|
|
|
|
|
|
|
|
|
|
* jmp K.SYSCALL.JMPX
|
2016-10-29 19:58:21 +00:00
|
|
|
|
*/--------------------------------------
|
2018-06-21 15:12:10 +00:00
|
|
|
|
* # GetEnv
|
2018-09-06 15:36:44 +00:00
|
|
|
|
* searches the environment list to find the environment variable name,
|
|
|
|
|
* and returns a pointer to the corresponding value string.
|
2020-02-14 07:21:56 +00:00
|
|
|
|
* ## C / CSH
|
2020-01-15 07:10:24 +00:00
|
|
|
|
* `char *getenv(const char *name, char *value);`
|
2018-09-06 15:36:44 +00:00
|
|
|
|
* ## ASM
|
2018-06-14 15:31:36 +00:00
|
|
|
|
* **In:**
|
2020-01-15 07:10:24 +00:00
|
|
|
|
* `>PUSHW name`
|
|
|
|
|
* `>PUSHW value`
|
2018-10-11 15:23:06 +00:00
|
|
|
|
* `>SYSCALL getenv`
|
|
|
|
|
* ## RETURN VALUE
|
2018-09-06 15:36:44 +00:00
|
|
|
|
* CC : Y,A = PTR to VALUE (C-String)
|
2016-08-17 06:25:58 +00:00
|
|
|
|
* CS : not found
|
2016-10-29 19:58:21 +00:00
|
|
|
|
*\--------------------------------------
|
2020-01-15 09:50:04 +00:00
|
|
|
|
K.GetEnv >PULLW FORPNT value
|
2020-02-06 16:23:59 +00:00
|
|
|
|
* >PULLW TXTPTR name
|
|
|
|
|
*
|
|
|
|
|
* ldy #S.PS.hENV
|
|
|
|
|
* lda (pPs),y
|
2020-02-02 14:58:01 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
* jmp K.SYSCALL.JMPX
|
|
|
|
|
*/--------------------------------------
|
|
|
|
|
* # PutEnv
|
|
|
|
|
* Change or add an environment variable, string is 'NAME=VALUE'
|
2020-02-14 07:21:56 +00:00
|
|
|
|
* ## C / CSH
|
2020-02-06 16:23:59 +00:00
|
|
|
|
* `int putenv(char *string);`
|
|
|
|
|
* ## ASM
|
|
|
|
|
* **In:**
|
|
|
|
|
* `>PUSHW string`
|
|
|
|
|
* `>SYSCALL putenv`
|
|
|
|
|
* ## RETURN VALUE
|
|
|
|
|
*\--------------------------------------
|
|
|
|
|
K.PutEnv >PULLW TXTPTR NAME=VALUE
|
2016-10-29 19:58:21 +00:00
|
|
|
|
*/--------------------------------------
|
2018-06-21 15:12:10 +00:00
|
|
|
|
* # UnsetEnv
|
2018-09-06 15:36:44 +00:00
|
|
|
|
* Remove an environment variable
|
2020-02-14 07:21:56 +00:00
|
|
|
|
* ## C / CSH
|
2018-09-06 15:36:44 +00:00
|
|
|
|
* `int unsetenv(const char *name);`
|
|
|
|
|
* ## ASM
|
2018-06-14 15:31:36 +00:00
|
|
|
|
* **In:**
|
2020-01-17 11:23:11 +00:00
|
|
|
|
* `>PUSHW name`
|
2018-09-06 15:36:44 +00:00
|
|
|
|
* `>SYSCALL unsetenv`
|
2018-10-11 15:23:06 +00:00
|
|
|
|
* ## RETURN VALUE
|
2016-10-29 19:58:21 +00:00
|
|
|
|
*\--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
K.UnsetEnv
|
|
|
|
|
* >PULLW TXTPTR name
|
2020-01-17 13:25:59 +00:00
|
|
|
|
|
2020-02-05 06:46:52 +00:00
|
|
|
|
ldy #S.PS.hENV
|
2020-02-03 15:17:34 +00:00
|
|
|
|
lda (pPs),y
|
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jmp K.SYSCALL.JMPX
|
2016-08-17 06:25:58 +00:00
|
|
|
|
*--------------------------------------
|
2015-03-14 21:48:35 +00:00
|
|
|
|
MAN
|
2018-11-17 17:17:13 +00:00
|
|
|
|
SAVE USR/SRC/SYS/KERNEL.S.ENV
|
|
|
|
|
LOAD USR/SRC/SYS/KERNEL.S
|
2015-03-14 21:48:35 +00:00
|
|
|
|
ASM
|