Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
8061 | Alex2003 | 1 | |
2 | |||
3 | |||
4 |
|
||
5 |
|
||
6 |
|
||
7 |
|
||
8 |
|
||
9 | |||
10 | |||
11 | |||
12 | |||
13 |
|
||
14 |
|
||
15 | Register eax = 70 |
||
16 | Register ebx = pointer to the information structure |
||
17 | Returned value: |
||
18 | Register eax = 0 - success; otherwise file system error code some subfunctions return value in other registers too. |
||
19 | General format of the information structure: |
||
20 | +0: dword: subfunction number |
||
21 | +4: dword: offset in file or folder |
||
22 | +8: dword: higher part of offset or flags |
||
23 | +12 = +0xC: dword: size of data |
||
24 | +16 = +0x10: dword: pointer to data |
||
25 | +20 = +0x14: ?: path - zero terminated string |
||
26 | or |
||
27 | +20 = +0x14: byte: 0 |
||
28 | +21 = +0x15: dword: pointer to string |
||
29 | Case sensitivity depends on filesystem. |
||
30 | If a path not begins with '/', it is considered a relative. |
||
31 | To get or set the current folder, use the sysfunction 30. |
||
32 | '../' in the path means a lift by one folder relatively current folder. |
||
33 | To set the encoding, put at the start of the string a byte with next values: |
||
34 | 1 = cp866 |
||
35 | 2 = UTF-16LE |
||
36 | 3 = UTF-8 |
||
37 | otherwise will be used cp866. In an absolute path you may put this byte after the '/' or put an additional '/' before it. |
||
38 | Also, you may use the sysfunction 80. |
||
39 | Format of an absolute path: /base/number/dir1/dir2/.../dirn/file, where base/number identifies device, on which file is located: |
||
40 | RD/1 = ramdisk |
||
41 | FD/1 = first floppy drive, FD/2 = second floppy drive |
||
42 | HD0/x, HD1/x, HD2/x, HD3/x = hard drives accordingly on IDE0 (Primary Master), IDE1 (Primary Slave), IDE2 (Secondary Master), IDE3 (Secondary Slave); x - partition number on the selected hard drive, starts from 1 |
||
43 | CD0/1, CD1/1, CD2/1, CD3/1 = same for cd |
||
44 | SYS = system folder (encoding inaffected key), second key may be set by sysfunction 30.3. |
||
45 | Examples: |
||
46 | '/sys/example.asm',0 |
||
47 | '/rd/1/example.asm',0 |
||
48 | '/HD0/1/folder/file.txt',0 |
||
49 | '/hd2/2/pics/tanzania.bmp',0 |
||
50 | 2,'/',0,'sys','/',0,'F',0,'I',0,'L',0,'E',0,0,0 |
||
51 | |||
52 | Available subfunctions: |
||
53 | subfunction 0 - read file |
||
54 | subfunction 1 - read folder |
||
55 | subfunction 2 - create/rewrite file |
||
56 | subfunction 3 - write to existing file |
||
57 | subfunction 4 - set file size |
||
58 | subfunction 5 - get attributes of file/folder |
||
59 | subfunction 6 - set attributes of file/folder |
||
60 | subfunction 7 - start application |
||
61 | subfunction 8 - delete file/folder |
||
62 | subfunction 9 - create folder |
||
63 | For CD-drives due to hardware limitations only subfunctions 0,1,5 and 7 are available, other subfunctions return error with code 2. |
||
64 | At the first call of subfunctions 0,1,5,7 to ATAPI devices(CD and DVD) the manual control of tray is locked due to caching drive data. Unlocking is made when subfunction 4 of function 24 is called for corresponding device. |
||
65 | |||
66 | Value for register eax - 70 (SF_FILE). |
||
67 | Values for register ebx: |
||
68 | |||
69 | 1 - SSF_READ_FOLDER - subfunction 1 - read folder with long names support. |
||
70 | 2 - SSF_CREATE_FILE - subfunction 2 - create/rewrite file with long names support. |
||
71 | 3 - SSF_WRITE_FILE - subfunction 3 - write to existing file with long names support. |
||
72 | 4 - SSF_SET_END - subfunction 4 - set end of file. |
||
73 | 5 - SSF_GET_INFO - subfunction 5 - get information on file/folder. |
||
74 | 6 - SSF_SET_INFO - subfunction 6 - set attributes of file/folder. |
||
75 | 7 - SSF_START_APP - subfunction 7 - start application. |
||
76 | 8 - SSF_DELETE - subfunction 8 - delete file/folder. |
||
77 | 9 - SSF_CREATE_FOLDER - subfunction 9 - create folder. |
||
78 | |||
79 | |||
80 | |||
81 |