Rev 431 | Rev 520 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 431 | Rev 465 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | $Revision: 431 $ |
1 | $Revision: 465 $ |
2 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
3 | ;; ;; |
3 | ;; ;; |
4 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
4 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
5 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; Distributed under terms of the GNU General Public License ;; |
6 | ;; ;; |
6 | ;; ;; |
Line 91... | Line 91... | ||
91 | ; 6 : set file/directory attributes structure |
91 | ; 6 : set file/directory attributes structure |
92 | ; 7 : start application |
92 | ; 7 : start application |
93 | ; 8 : delete file |
93 | ; 8 : delete file |
94 | ; 9 : create directory |
94 | ; 9 : create directory |
Line 95... | Line 95... | ||
95 | 95 | ||
96 | add eax, std_application_base_address |
96 | ; add eax, std_application_base_address |
97 | ; parse file name |
97 | ; parse file name |
98 | xchg ebx, eax |
98 | xchg ebx, eax |
99 | lea esi, [ebx+20] |
99 | lea esi, [ebx+20] |
100 | mov ebp, esi ; for 'start app' function full path must be known |
100 | mov ebp, esi ; for 'start app' function full path must be known |
101 | lodsb |
101 | lodsb |
102 | test al, al |
102 | test al, al |
103 | jnz @f |
103 | jnz @f |
104 | mov esi, [esi] |
104 | mov esi, [esi] |
105 | add esi, std_application_base_address |
105 | ; add esi, std_application_base_address |
106 | mov ebp, esi |
106 | mov ebp, esi |
107 | lodsb |
107 | lodsb |
108 | @@: |
108 | @@: |
109 | cmp dword [ebx], 7 |
109 | cmp dword [ebx], 7 |
110 | jne @F |
110 | jne @F |
111 | mov edx, [ebx+4] |
111 | mov edx, [ebx+4] |
112 | mov ebx, [ebx+8] |
112 | mov ebx, [ebx+8] |
113 | test ebx, ebx |
113 | test ebx, ebx |
114 | jz .l1 |
114 | jz .l1 |
115 | add ebx, new_app_base |
115 | ; add ebx, new_app_base |
116 | .l1: |
116 | .l1: |
117 | call fs_execute ; ebp, ebx, edx |
117 | call fs_execute ; ebp, ebx, edx |
118 | mov [esp+36], eax |
118 | mov [esp+36], eax |
119 | ret |
119 | ret |
Line 155... | Line 155... | ||
155 | cmp dword [ebx], 1 |
155 | cmp dword [ebx], 1 |
156 | jnz .access_denied |
156 | jnz .access_denied |
157 | xor eax, eax |
157 | xor eax, eax |
158 | mov ebp, [ebx+12] |
158 | mov ebp, [ebx+12] |
159 | mov edx, [ebx+16] |
159 | mov edx, [ebx+16] |
160 | add edx, std_application_base_address |
160 | ; add edx, std_application_base_address |
161 | push dword [ebx+4] ; first block |
161 | push dword [ebx+4] ; first block |
162 | mov ebx, [ebx+8] ; flags |
162 | mov ebx, [ebx+8] ; flags |
163 | mov esi, [edi+4] |
163 | mov esi, [edi+4] |
164 | ; ebx=flags, [esp]=first block, ebp=number of blocks, edx=return area, esi='Next' handler |
164 | ; ebx=flags, [esp]=first block, ebp=number of blocks, edx=return area, esi='Next' handler |
165 | mov edi, edx |
165 | mov edi, edx |
Line 237... | Line 237... | ||
237 | .readroot: |
237 | .readroot: |
238 | ; virtual root folder - special handler |
238 | ; virtual root folder - special handler |
239 | mov esi, virtual_root_query |
239 | mov esi, virtual_root_query |
240 | mov ebp, [ebx+12] |
240 | mov ebp, [ebx+12] |
241 | mov edx, [ebx+16] |
241 | mov edx, [ebx+16] |
242 | add edx, std_application_base_address |
242 | ; add edx, std_application_base_address |
243 | push dword [ebx+4] ; first block |
243 | push dword [ebx+4] ; first block |
244 | mov ebx, [ebx+8] ; flags |
244 | mov ebx, [ebx+8] ; flags |
245 | xor eax, eax |
245 | xor eax, eax |
246 | ; eax=0, [esp]=first block, ebx=flags, ebp=number of blocks, edx=return area |
246 | ; eax=0, [esp]=first block, ebx=flags, ebp=number of blocks, edx=return area |
247 | mov edi, edx |
247 | mov edi, edx |
Line 346... | Line 346... | ||
346 | mov eax, [ebx] |
346 | mov eax, [ebx] |
347 | cmp eax, fs_NumRamdiskServices |
347 | cmp eax, fs_NumRamdiskServices |
348 | jae .not_impl |
348 | jae .not_impl |
349 | mov ecx, [ebx+12] |
349 | mov ecx, [ebx+12] |
350 | mov edx, [ebx+16] |
350 | mov edx, [ebx+16] |
351 | add edx, std_application_base_address |
351 | ; add edx, std_application_base_address |
352 | add ebx, 4 |
352 | add ebx, 4 |
353 | call dword [fs_RamdiskServices + eax*4] |
353 | call dword [fs_RamdiskServices + eax*4] |
354 | mov [esp+36], eax |
354 | mov [esp+36], eax |
355 | mov [esp+24], ebx |
355 | mov [esp+24], ebx |
356 | ret |
356 | ret |
Line 383... | Line 383... | ||
383 | jae fs_OnRamdisk.not_impl |
383 | jae fs_OnRamdisk.not_impl |
384 | call reserve_flp |
384 | call reserve_flp |
385 | mov [flp_number], cl |
385 | mov [flp_number], cl |
386 | mov ecx, [ebx+12] |
386 | mov ecx, [ebx+12] |
387 | mov edx, [ebx+16] |
387 | mov edx, [ebx+16] |
388 | add edx, std_application_base_address |
388 | ; add edx, std_application_base_address |
389 | add ebx, 4 |
389 | add ebx, 4 |
390 | call dword [fs_FloppyServices + eax*4] |
390 | call dword [fs_FloppyServices + eax*4] |
391 | and [flp_status], 0 |
391 | and [flp_status], 0 |
392 | mov [esp+36], eax |
392 | mov [esp+36], eax |
393 | mov [esp+24], ebx |
393 | mov [esp+24], ebx |
Line 447... | Line 447... | ||
447 | push ebx esi |
447 | push ebx esi |
448 | call choice_necessity_partition_1 |
448 | call choice_necessity_partition_1 |
449 | pop esi ebx |
449 | pop esi ebx |
450 | mov ecx, [ebx+12] |
450 | mov ecx, [ebx+12] |
451 | mov edx, [ebx+16] |
451 | mov edx, [ebx+16] |
452 | add edx, std_application_base_address |
452 | ; add edx, std_application_base_address |
453 | mov eax, [ebx] |
453 | mov eax, [ebx] |
454 | cmp eax, fs_NumHdServices |
454 | cmp eax, fs_NumHdServices |
455 | jae .not_impl |
455 | jae .not_impl |
456 | add ebx, 4 |
456 | add ebx, 4 |
457 | call dword [fs_HdServices + eax*4] |
457 | call dword [fs_HdServices + eax*4] |
Line 523... | Line 523... | ||
523 | mov dword [esp+36], 5 ; not found |
523 | mov dword [esp+36], 5 ; not found |
524 | ret |
524 | ret |
525 | @@: |
525 | @@: |
526 | mov ecx, [ebx+12] |
526 | mov ecx, [ebx+12] |
527 | mov edx, [ebx+16] |
527 | mov edx, [ebx+16] |
528 | add edx, std_application_base_address |
528 | ; add edx, std_application_base_address |
529 | mov eax, [ebx] |
529 | mov eax, [ebx] |
530 | cmp eax,fs_NumCdServices |
530 | cmp eax,fs_NumCdServices |
531 | jae .not_impl |
531 | jae .not_impl |
532 | add ebx, 4 |
532 | add ebx, 4 |
533 | call dword [fs_CdServices + eax*4] |
533 | call dword [fs_CdServices + eax*4] |