Rev 8392 | Rev 8946 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8392 | Rev 8750 | ||
---|---|---|---|
Line 14... | Line 14... | ||
14 | // // |
14 | // // |
15 | // Basic System Functions // |
15 | // Basic System Functions // |
16 | // // |
16 | // // |
17 | //===================================================// |
17 | //===================================================// |
Line 18... | Line 18... | ||
18 | 18 | ||
19 | :struct f70{ |
19 | :struct F70{ |
20 | dword func; |
20 | dword func; |
21 | dword param1; |
21 | dword param1; |
22 | dword param2; |
22 | dword param2; |
23 | dword param3; |
23 | dword param3; |
24 | dword param4; |
24 | dword param4; |
25 | char rezerv; |
25 | char rezerv; |
26 | dword name; |
26 | dword name; |
Line 27... | Line 27... | ||
27 | }; |
27 | } f70; |
28 | 28 | ||
29 | :struct BDVK { |
29 | :struct BDVK { |
30 | dword readonly:1, hidden:1, system:1, volume_label:1, isfolder:1, notarchived:1, :0; |
30 | dword readonly:1, hidden:1, system:1, volume_label:1, isfolder:1, notarchived:1, :0; |
Line 41... | Line 41... | ||
41 | char name[518]; |
41 | char name[518]; |
42 | }; |
42 | }; |
Line 43... | Line -... | ||
43 | - | ||
44 | 43 | ||
45 | 44 | ||
46 | :f70 getinfo_file_70; |
45 | |
47 | :dword GetFileInfo(dword file_path, bdvk_struct) |
46 | :dword GetFileInfo(dword file_path, bdvk_struct) |
48 | { |
47 | { |
49 | getinfo_file_70.func = 5; |
48 | f70.func = 5; |
50 | getinfo_file_70.param1 = |
49 | f70.param1 = |
51 | getinfo_file_70.param2 = |
50 | f70.param2 = |
52 | getinfo_file_70.param3 = 0; |
51 | f70.param3 = 0; |
53 | getinfo_file_70.param4 = bdvk_struct; |
52 | f70.param4 = bdvk_struct; |
54 | getinfo_file_70.rezerv = 0; |
53 | f70.rezerv = 0; |
55 | getinfo_file_70.name = file_path; |
54 | f70.name = file_path; |
56 | $mov eax,70 |
55 | $mov eax,70 |
Line 57... | Line -... | ||
57 | $mov ebx,#getinfo_file_70.func |
- | |
58 | $int 0x40 |
56 | $mov ebx,#f70.func |
59 | } |
57 | $int 0x40 |
60 | 58 | } |
|
61 | :f70 setinfo_file_70; |
59 | |
62 | :dword SetFileInfo(dword file_path, bdvk_struct) |
60 | :dword SetFileInfo(dword file_path, bdvk_struct) |
63 | { |
61 | { |
64 | setinfo_file_70.func = 6; |
62 | f70.func = 6; |
65 | setinfo_file_70.param1 = |
63 | f70.param1 = |
66 | setinfo_file_70.param2 = |
64 | f70.param2 = |
67 | setinfo_file_70.param3 = 0; |
65 | f70.param3 = 0; |
68 | setinfo_file_70.param4 = bdvk_struct; |
66 | f70.param4 = bdvk_struct; |
69 | setinfo_file_70.rezerv = 0; |
67 | f70.rezerv = 0; |
70 | setinfo_file_70.name = file_path; |
68 | f70.name = file_path; |
Line 71... | Line -... | ||
71 | $mov eax,70 |
- | |
72 | $mov ebx,#setinfo_file_70.func |
69 | $mov eax,70 |
73 | $int 0x40 |
70 | $mov ebx,#f70.func |
74 | } |
71 | $int 0x40 |
75 | 72 | } |
|
76 | :f70 run_file_70; |
73 | |
77 | :signed int RunProgram(dword run_path, run_param) |
74 | :signed int RunProgram(dword run_path, run_param) |
78 | { |
75 | { |
79 | run_file_70.func = 7; |
76 | f70.func = 7; |
80 | run_file_70.param1 = |
77 | f70.param1 = |
81 | run_file_70.param3 = |
78 | f70.param3 = |
82 | run_file_70.param4 = |
79 | f70.param4 = |
83 | run_file_70.rezerv = 0; |
80 | f70.rezerv = 0; |
84 | run_file_70.param2 = run_param; |
81 | f70.param2 = run_param; |
Line 85... | Line -... | ||
85 | run_file_70.name = run_path; |
- | |
86 | $mov eax,70 |
82 | f70.name = run_path; |
87 | $mov ebx,#run_file_70.func |
83 | $mov eax,70 |
88 | $int 0x40 |
84 | $mov ebx,#f70.func |
89 | } |
85 | $int 0x40 |
90 | 86 | } |
|
91 | :f70 create_dir_70; |
87 | |
92 | :int CreateDir(dword new_folder_path) |
88 | :int CreateDir(dword new_folder_path) |
93 | { |
89 | { |
94 | create_dir_70.func = 9; |
90 | f70.func = 9; |
95 | create_dir_70.param1 = |
91 | f70.param1 = |
96 | create_dir_70.param2 = |
92 | f70.param2 = |
97 | create_dir_70.param3 = |
93 | f70.param3 = |
98 | create_dir_70.param4 = |
94 | f70.param4 = |
Line 99... | Line -... | ||
99 | create_dir_70.rezerv = 0; |
- | |
100 | create_dir_70.name = new_folder_path; |
95 | f70.rezerv = 0; |
101 | $mov eax,70 |
96 | f70.name = new_folder_path; |
102 | $mov ebx,#create_dir_70.func |
97 | $mov eax,70 |
103 | $int 0x40 |
98 | $mov ebx,#f70.func |
104 | } |
99 | $int 0x40 |
105 | 100 | } |
|
106 | :f70 del_file_70; |
101 | |
107 | :int DeleteFile(dword del_file_path) |
102 | :int DeleteFile(dword del_file_path) |
108 | { |
103 | { |
109 | del_file_70.func = 8; |
104 | f70.func = 8; |
110 | del_file_70.param1 = |
105 | f70.param1 = |
111 | del_file_70.param2 = |
106 | f70.param2 = |
112 | del_file_70.param3 = |
107 | f70.param3 = |
Line 113... | Line -... | ||
113 | del_file_70.param4 = |
- | |
114 | del_file_70.rezerv = 0; |
108 | f70.param4 = |
115 | del_file_70.name = del_file_path; |
109 | f70.rezerv = 0; |
116 | $mov eax,70 |
110 | f70.name = del_file_path; |
117 | $mov ebx,#del_file_70.func |
111 | $mov eax,70 |
118 | $int 0x40 |
112 | $mov ebx,#f70.func |
119 | } |
113 | $int 0x40 |
120 | 114 | } |
|
121 | :f70 read_file_70; |
115 | |
122 | :int ReadFile(dword offset, data_size, buffer, file_path) |
116 | :int ReadFile(dword offset, data_size, buffer, file_path) |
123 | { |
117 | { |
124 | read_file_70.func = 0; |
118 | f70.func = 0; |
125 | read_file_70.param1 = offset; |
119 | f70.param1 = offset; |
126 | read_file_70.param2 = 0; |
120 | f70.param2 = 0; |
Line 127... | Line -... | ||
127 | read_file_70.param3 = data_size; |
- | |
128 | read_file_70.param4 = buffer; |
121 | f70.param3 = data_size; |
129 | read_file_70.rezerv = 0; |
122 | f70.param4 = buffer; |
130 | read_file_70.name = file_path; |
123 | f70.rezerv = 0; |
131 | $mov eax,70 |
124 | f70.name = file_path; |
132 | $mov ebx,#read_file_70.func |
125 | $mov eax,70 |
133 | $int 0x40 |
126 | $mov ebx,#f70.func |
134 | } |
127 | $int 0x40 |
135 | 128 | } |
|
136 | :f70 write_file_70; |
129 | |
137 | :int CreateFile(dword data_size, buffer, file_path) |
130 | :int CreateFile(dword data_size, buffer, file_path) |
138 | { |
131 | { |
139 | write_file_70.func = 2; |
132 | f70.func = 2; |
140 | write_file_70.param1 = 0; |
133 | f70.param1 = 0; |
Line 141... | Line 134... | ||
141 | write_file_70.param2 = 0; |
134 | f70.param2 = 0; |
142 | write_file_70.param3 = data_size; |
135 | f70.param3 = data_size; |
143 | write_file_70.param4 = buffer; |
136 | f70.param4 = buffer; |
144 | write_file_70.rezerv = 0; |
- | |
145 | write_file_70.name = file_path; |
137 | f70.rezerv = 0; |
146 | $mov eax,70 |
138 | f70.name = file_path; |
147 | $mov ebx,#write_file_70.func |
139 | $mov eax,70 |
148 | $int 0x40 |
140 | $mov ebx,#f70.func |
149 | } |
141 | $int 0x40 |
150 | 142 | } |
|
151 | //////////////////////////////////////// |
143 | |
152 | // WriteInFileThatAlredyExists // |
144 | //////////////////////////////////////// |
153 | //////////////////////////////////////// |
145 | // WriteInFileThatAlredyExists // |
- | 146 | //////////////////////////////////////// |
|
- | 147 | :int WriteFile(dword offset, data_size, buffer, file_path) |
|
- | 148 | { |
|
- | 149 | f70.func = 3; |
|
- | 150 | f70.param1 = offset; |
|
- | 151 | f70.param2 = 0; |
|
- | 152 | f70.param3 = data_size; |
|
- | 153 | f70.param4 = buffer; |
|
- | 154 | f70.rezerv = 0; |
|
- | 155 | f70.name = file_path; |
|
- | 156 | $mov eax,70 |
|
- | 157 | $mov ebx,#f70.func |
|
- | 158 | $int 0x40 |
|
- | 159 | } |
|
154 | :f70 write_file_offset_70; |
160 | |
155 | :int WriteFile(dword offset, data_size, buffer, file_path) |
161 | :int RenameMove(dword path_to, path_from) |
156 | { |
162 | { |
157 | write_file_offset_70.func = 3; |
163 | f70.func = 10; |
Line 158... | Line -... | ||
158 | write_file_offset_70.param1 = offset; |
- | |
159 | write_file_offset_70.param2 = 0; |
164 | f70.param1 = |
160 | write_file_offset_70.param3 = data_size; |
165 | f70.param2 = |
161 | write_file_offset_70.param4 = buffer; |
166 | f70.param3 = 0; |
162 | write_file_offset_70.rezerv = 0; |
167 | f70.param4 = path_to; |
163 | write_file_offset_70.name = file_path; |
168 | f70.rezerv = 0; |
164 | $mov eax,70 |
169 | f70.name = path_from; |
165 | $mov ebx,#write_file_offset_70.func |
170 | $mov eax,70 |
166 | $int 0x40 |
171 | $mov ebx,#f70.func |
167 | } |
172 | $int 0x40 |
168 | 173 | } |
|
169 | :f70 read_dir_70; |
174 | |
170 | :int ReadDir(dword file_count, read_buffer, dir_path) |
175 | :int ReadDir(dword file_count, read_buffer, dir_path) |
171 | { |
176 | { |
Line 172... | Line 177... | ||
172 | read_dir_70.func = 1; |
177 | f70.func = 1; |
173 | read_dir_70.param1 = |
178 | f70.param1 = |