Function 30
and its subfunctions (1-5) - work with the current
folder.
Subfunction 1 - set the current folder for the stream
Options:
* eax =
30 - function number
* ebx = 1
- number of subfunction
* ecx =
pointer to the string with the path to the new current folder,
The rules for forming the string are specified
in the description of function 70
Return value:
* function does not return value
Subfunction 2 - get current folder for stream
Options:
* eax =
30 - function number
* ebx = 2
- subfunction number
* ecx =
pointer to buffer
* edx =
buffer size
Return value:
* eax =
string length (including trailing 0)
Remarks:
If the buffer size is
not enough to copy the entire path, only part of the string is copied and the
trailing 0 is put at the end.
By default, the current folder for the stream is "/ rd / 1".
When creating a process / thread, the current folder is
inherited from the parent.
Subfunction 3 - install add. system directory for the
kernel
Options:
* eax =
30 - function number
* ebx = 3
- subfunction number
* ecx =
pointer to data block:
key rb 64
path rb 64
Example:
align 64
key db 'kolibrios', 0; the key must be in lower case
align 64
path db
'HD0 / 1', 0
Return value:
* function does not return value
Remarks:
The function can only
be called once per session of the OS.
When entering a path,
the character key is independent of the encoding.
Subfunction 4 - set the current folder with encoding
Options:
* eax =
30 - function number
* ebx = 4
- subfunction number
* ecx =
pointer to the string with the path to the new current folder
* edx =
string encoding, details are provided in function 80 description.
Return value:
* function does not return value
Subfunction 5 - get the
current folder with encoding
Options:
* eax =
30 - function number
* ebx = 5
- subfunction number
* ecx =
pointer to buffer
* edx =
buffer size
* esi =
string encoding
Return value:
* eax =
string length in bytes (including the terminating 0)
Remarks:
If the buffer size is
not enough to copy the entire path, only part of the string is copied and the
trailing 0 is put at the end.
By default, the
current folder for the stream is "/ rd /
1".
When creating a
process / thread, the current folder is inherited from the parent.
---------------------- Constants for registers: ----------------------
eax -
SF_CURRENT_FOLDER (30)
ebx -
SSF_SET_CF (1), SSF_GET_CF (2), SSF_ADD_SYS_FOLDER (3)