Rev 6328 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6328 | Rev 6341 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;----------------------------------------------------------- |
1 | ;----------------------------------------------------------- |
2 | ;-----------load heading of file in memory------------------ |
- | |
3 | ;----------------------------------------------------------- |
- | |
4 | - | ||
5 | load_heading_of_file: |
- | |
6 | - | ||
7 | mov [where_load_file],ebx |
- | |
8 | mov [full_file_path],eax |
- | |
9 | - | ||
10 | mov esi,[full_file_path] |
- | |
11 | mov edi,filepath |
- | |
12 | mov ecx,256 |
- | |
13 | rep movsd |
- | |
14 | - | ||
15 | xor eax,eax |
- | |
16 | mov ecx,[where_load_file] |
- | |
17 | mov edx,filepath |
- | |
18 | - | ||
19 | mov [file_information],eax |
- | |
20 | mov [file_information+4],eax |
- | |
21 | mov [file_information+8],eax |
- | |
22 | mov [file_information+12],dword 512 |
- | |
23 | mov [file_information+16],ecx |
- | |
24 | mov [file_information+20],al |
- | |
25 | mov [file_information+21],edx |
- | |
26 | - | ||
27 | mov eax,70 |
- | |
28 | mov ebx,file_information |
- | |
29 | mcall |
- | |
30 | - | ||
31 | ret |
- | |
32 | ;----------------------------------------------------------- |
- | |
33 | ;--------load file in memory-------------------------------- |
- | |
34 | ;----------------------------------------------------------- |
- | |
35 | load_file: |
- | |
36 | mov [where_load_file],ebx |
- | |
37 | mov [full_file_path],eax |
- | |
38 | - | ||
39 | mov esi,[full_file_path] |
- | |
40 | mov edi,filepath |
- | |
41 | mov ecx,256 |
- | |
42 | rep movsd |
- | |
43 | - | ||
44 | xor eax,eax |
- | |
45 | mov ebx,bufer_for_info |
- | |
46 | mov ecx,filepath |
- | |
47 | - | ||
48 | mov [file_information],dword 5 |
- | |
49 | mov [file_information+4],eax |
- | |
50 | mov [file_information+8],eax |
- | |
51 | mov [file_information+12],eax |
- | |
52 | mov [file_information+16],ebx |
- | |
53 | mov [file_information+20],al |
- | |
54 | mov [file_information+21],ecx |
- | |
55 | - | ||
56 | mov eax,70 |
- | |
57 | mov ebx,file_information |
- | |
58 | mcall |
- | |
59 | - | ||
60 | test eax,eax |
- | |
61 | jnz error_load_file |
- | |
62 | - | ||
63 | xor eax,eax |
- | |
64 | mov ebx,[bufer_for_info+32] |
- | |
65 | mov ecx,[where_load_file] |
- | |
66 | mov edx,filepath |
- | |
67 | - | ||
68 | mov [file_information],eax |
- | |
69 | mov [file_information+4],eax |
- | |
70 | mov [file_information+8],eax |
- | |
71 | mov [file_information+12],ebx |
- | |
72 | mov [file_information+16],ecx |
- | |
73 | mov [file_information+20],al |
- | |
74 | mov [file_information+21],edx |
- | |
75 | - | ||
76 | mov eax,70 |
- | |
77 | mov ebx,file_information |
- | |
78 | mcall |
- | |
79 | - | ||
80 | error_load_file: |
- | |
81 | - | ||
82 | ret |
- | |
83 | ;----------------------------------------------------------- |
- | |
84 | ;---------------save in file from memory-------------------- |
2 | ;---------------save in file from memory-------------------- |
85 | ;----------------------------------------------------------- |
3 | ;----------------------------------------------------------- |
86 | save_file: |
4 | save_file: |
87 | mov [size_to_save],ecx |
5 | mov [size_to_save],ecx |
88 | mov [pointer_to_data],ebx |
6 | mov [pointer_to_data],ebx |
Line 96... | Line 14... | ||
96 | xor eax,eax |
14 | xor eax,eax |
97 | mov ebx,[size_to_save] |
15 | mov ebx,[size_to_save] |
98 | mov ecx,[pointer_to_data] |
16 | mov ecx,[pointer_to_data] |
99 | mov edx,filepath |
17 | mov edx,filepath |
Line 100... | Line 18... | ||
100 | 18 | ||
101 | mov [file_information],dword 2 |
19 | mov dword[file_information],SSF_CREATE_FILE |
102 | mov [file_information+4],eax |
20 | mov [file_information+4],eax |
103 | mov [file_information+8],eax |
21 | mov [file_information+8],eax |
104 | mov [file_information+12],ebx |
22 | mov [file_information+12],ebx |
105 | mov [file_information+16],ecx |
23 | mov [file_information+16],ecx |
106 | mov [file_information+20],al |
24 | mov [file_information+20],al |
Line 107... | Line -... | ||
107 | mov [file_information+21],edx |
- | |
108 | 25 | mov [file_information+21],edx |
|
109 | mov eax,70 |
- | |
Line 110... | Line 26... | ||
110 | mov ebx,file_information |
26 | |
Line 111... | Line 27... | ||
111 | mcall |
27 | mcall SF_FILE,file_information |
112 | 28 | ||
113 | ret |
29 | ret |