Rev 388 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 388 | Rev 419 | ||
---|---|---|---|
Line 83... | Line 83... | ||
83 | ; 6 : set file/directory attributes structure |
83 | ; 6 : set file/directory attributes structure |
84 | ; 7 : start application |
84 | ; 7 : start application |
85 | ; 8 : delete file |
85 | ; 8 : delete file |
86 | ; 9 : create directory |
86 | ; 9 : create directory |
Line 87... | Line 87... | ||
87 | 87 | ||
88 | add eax, std_application_base_address |
88 | ; add eax, std_application_base_address |
89 | ; parse file name |
89 | ; parse file name |
90 | xchg ebx, eax |
90 | xchg ebx, eax |
91 | lea esi, [ebx+20] |
91 | lea esi, [ebx+20] |
92 | mov ebp, esi ; for 'start app' function full path must be known |
92 | mov ebp, esi ; for 'start app' function full path must be known |
93 | lodsb |
93 | lodsb |
94 | test al, al |
94 | test al, al |
95 | jnz @f |
95 | jnz @f |
96 | mov esi, [esi] |
96 | mov esi, [esi] |
97 | add esi, std_application_base_address |
97 | ; add esi, std_application_base_address |
98 | mov ebp, esi |
98 | mov ebp, esi |
99 | lodsb |
99 | lodsb |
100 | @@: |
100 | @@: |
101 | cmp dword [ebx], 7 |
101 | cmp dword [ebx], 7 |
102 | jne @F |
102 | jne @F |
103 | mov edx, [ebx+4] |
103 | mov edx, [ebx+4] |
104 | mov ebx, [ebx+8] |
104 | mov ebx, [ebx+8] |
105 | test ebx, ebx |
105 | test ebx, ebx |
106 | jz .l1 |
106 | jz .l1 |
107 | add ebx, new_app_base |
107 | ; add ebx, new_app_base |
108 | .l1: |
108 | .l1: |
109 | call fs_execute ; ebp, ebx, edx |
109 | call fs_execute ; ebp, ebx, edx |
110 | mov [esp+36], eax |
110 | mov [esp+36], eax |
111 | ret |
111 | ret |
Line 147... | Line 147... | ||
147 | cmp dword [ebx], 1 |
147 | cmp dword [ebx], 1 |
148 | jnz .access_denied |
148 | jnz .access_denied |
149 | xor eax, eax |
149 | xor eax, eax |
150 | mov ebp, [ebx+12] |
150 | mov ebp, [ebx+12] |
151 | mov edx, [ebx+16] |
151 | mov edx, [ebx+16] |
152 | add edx, std_application_base_address |
152 | ; add edx, std_application_base_address |
153 | push dword [ebx+4] ; first block |
153 | push dword [ebx+4] ; first block |
154 | mov ebx, [ebx+8] ; flags |
154 | mov ebx, [ebx+8] ; flags |
155 | mov esi, [edi+4] |
155 | mov esi, [edi+4] |
156 | ; ebx=flags, [esp]=first block, ebp=number of blocks, edx=return area, esi='Next' handler |
156 | ; ebx=flags, [esp]=first block, ebp=number of blocks, edx=return area, esi='Next' handler |
157 | mov edi, edx |
157 | mov edi, edx |
Line 229... | Line 229... | ||
229 | .readroot: |
229 | .readroot: |
230 | ; virtual root folder - special handler |
230 | ; virtual root folder - special handler |
231 | mov esi, virtual_root_query |
231 | mov esi, virtual_root_query |
232 | mov ebp, [ebx+12] |
232 | mov ebp, [ebx+12] |
233 | mov edx, [ebx+16] |
233 | mov edx, [ebx+16] |
234 | add edx, std_application_base_address |
234 | ; add edx, std_application_base_address |
235 | push dword [ebx+4] ; first block |
235 | push dword [ebx+4] ; first block |
236 | mov ebx, [ebx+8] ; flags |
236 | mov ebx, [ebx+8] ; flags |
237 | xor eax, eax |
237 | xor eax, eax |
238 | ; eax=0, [esp]=first block, ebx=flags, ebp=number of blocks, edx=return area |
238 | ; eax=0, [esp]=first block, ebx=flags, ebp=number of blocks, edx=return area |
239 | mov edi, edx |
239 | mov edi, edx |
Line 338... | Line 338... | ||
338 | mov eax, [ebx] |
338 | mov eax, [ebx] |
339 | cmp eax, fs_NumRamdiskServices |
339 | cmp eax, fs_NumRamdiskServices |
340 | jae .not_impl |
340 | jae .not_impl |
341 | mov ecx, [ebx+12] |
341 | mov ecx, [ebx+12] |
342 | mov edx, [ebx+16] |
342 | mov edx, [ebx+16] |
343 | add edx, std_application_base_address |
343 | ; add edx, std_application_base_address |
344 | add ebx, 4 |
344 | add ebx, 4 |
345 | call dword [fs_RamdiskServices + eax*4] |
345 | call dword [fs_RamdiskServices + eax*4] |
346 | mov [esp+36], eax |
346 | mov [esp+36], eax |
347 | mov [esp+24], ebx |
347 | mov [esp+24], ebx |
348 | ret |
348 | ret |
Line 375... | Line 375... | ||
375 | jae fs_OnRamdisk.not_impl |
375 | jae fs_OnRamdisk.not_impl |
376 | call reserve_flp |
376 | call reserve_flp |
377 | mov [flp_number], cl |
377 | mov [flp_number], cl |
378 | mov ecx, [ebx+12] |
378 | mov ecx, [ebx+12] |
379 | mov edx, [ebx+16] |
379 | mov edx, [ebx+16] |
380 | add edx, std_application_base_address |
380 | ; add edx, std_application_base_address |
381 | add ebx, 4 |
381 | add ebx, 4 |
382 | call dword [fs_FloppyServices + eax*4] |
382 | call dword [fs_FloppyServices + eax*4] |
383 | and [flp_status], 0 |
383 | and [flp_status], 0 |
384 | mov [esp+36], eax |
384 | mov [esp+36], eax |
385 | mov [esp+24], ebx |
385 | mov [esp+24], ebx |
Line 439... | Line 439... | ||
439 | push ebx esi |
439 | push ebx esi |
440 | call choice_necessity_partition_1 |
440 | call choice_necessity_partition_1 |
441 | pop esi ebx |
441 | pop esi ebx |
442 | mov ecx, [ebx+12] |
442 | mov ecx, [ebx+12] |
443 | mov edx, [ebx+16] |
443 | mov edx, [ebx+16] |
444 | add edx, std_application_base_address |
444 | ; add edx, std_application_base_address |
445 | mov eax, [ebx] |
445 | mov eax, [ebx] |
446 | cmp eax, fs_NumHdServices |
446 | cmp eax, fs_NumHdServices |
447 | jae .not_impl |
447 | jae .not_impl |
448 | add ebx, 4 |
448 | add ebx, 4 |
449 | call dword [fs_HdServices + eax*4] |
449 | call dword [fs_HdServices + eax*4] |
Line 515... | Line 515... | ||
515 | mov dword [esp+36], 5 ; not found |
515 | mov dword [esp+36], 5 ; not found |
516 | ret |
516 | ret |
517 | @@: |
517 | @@: |
518 | mov ecx, [ebx+12] |
518 | mov ecx, [ebx+12] |
519 | mov edx, [ebx+16] |
519 | mov edx, [ebx+16] |
520 | add edx, std_application_base_address |
520 | ; add edx, std_application_base_address |
521 | mov eax, [ebx] |
521 | mov eax, [ebx] |
522 | cmp eax,fs_NumCdServices |
522 | cmp eax,fs_NumCdServices |
523 | jae .not_impl |
523 | jae .not_impl |
524 | add ebx, 4 |
524 | add ebx, 4 |
525 | call dword [fs_CdServices + eax*4] |
525 | call dword [fs_CdServices + eax*4] |