Rev 2465 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2465 | Rev 2987 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | ;; 08.11.2004 expand_pathz and rename (only for hd) - ATV ;; |
15 | ;; 08.11.2004 expand_pathz and rename (only for hd) - ATV ;; |
16 | ;; 20.10.2004 Makedir/Removedir (only for hd) - ATV ;; |
16 | ;; 20.10.2004 Makedir/Removedir (only for hd) - ATV ;; |
17 | ;; ;; |
17 | ;; ;; |
18 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
18 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 19... | Line 19... | ||
19 | 19 | ||
Line 20... | Line 20... | ||
20 | $Revision: 2465 $ |
20 | $Revision: 2987 $ |
21 | 21 | ||
22 | 22 | ||
Line 167... | Line 167... | ||
167 | mov dword [esp+24], 32*2; size of root |
167 | mov dword [esp+24], 32*2; size of root |
168 | ret |
168 | ret |
Line 169... | Line 169... | ||
169 | 169 | ||
170 | fs_info: ;start of code - Mihasik |
170 | fs_info: ;start of code - Mihasik |
171 | push eax |
- | |
172 | cmp [eax+21], byte 'h' |
- | |
173 | je fs_info_h |
- | |
174 | cmp [eax+21], byte 'H' |
- | |
175 | je fs_info_h |
171 | push eax |
176 | cmp [eax+21], byte 'r' |
172 | cmp [eax+21], byte 'r' |
177 | je fs_info_r |
173 | je fs_info_r |
178 | cmp [eax+21], byte 'R' |
174 | cmp [eax+21], byte 'R' |
179 | je fs_info_r |
175 | je fs_info_r |
Line 187... | Line 183... | ||
187 | mov ecx, edi ;free space in ecx |
183 | mov ecx, edi ;free space in ecx |
188 | shr ecx, 9 ;free clusters |
184 | shr ecx, 9 ;free clusters |
189 | mov ebx, 2847 ;total clusters |
185 | mov ebx, 2847 ;total clusters |
190 | mov edx, 512 ;cluster size |
186 | mov edx, 512 ;cluster size |
191 | xor eax, eax ;always 0 |
187 | xor eax, eax ;always 0 |
192 | jmp fs_info1 |
- | |
193 | fs_info_h: ;if harddisk |
- | |
194 | call get_hd_info |
- | |
195 | fs_info1: |
188 | fs_info1: |
196 | pop edi |
189 | pop edi |
197 | mov [esp+36], eax |
190 | mov [esp+36], eax |
198 | mov [esp+24], ebx ; total clusters on disk |
191 | mov [esp+24], ebx ; total clusters on disk |
199 | mov [esp+32], ecx ; free clusters on disk |
192 | mov [esp+32], ecx ; free clusters on disk |
Line 435... | Line 428... | ||
435 | call free_hd_channel |
428 | call free_hd_channel |
436 | and [hd1_status], 0 |
429 | and [hd1_status], 0 |
437 | jmp file_system_return |
430 | jmp file_system_return |
438 | @@: |
431 | @@: |
Line 439... | Line -... | ||
439 | - | ||
440 | cmp dword [esp+20], 0; READ |
- | |
441 | jne fs_noharddisk_read |
- | |
442 | - | ||
443 | mov eax, [esp+0] ; /fname |
- | |
444 | lea edi, [eax+12] |
- | |
445 | mov byte [eax], 0 ; path to asciiz |
- | |
446 | inc eax ; filename start |
- | |
447 | - | ||
448 | mov ebx, [esp+12] ; count to read |
- | |
449 | mov ecx, [esp+8] ; buffer |
- | |
450 | mov edx, [esp+4] |
- | |
451 | add edx, 12*2 ; dir start |
- | |
452 | sub edi, edx ; path length |
- | |
453 | mov esi, [esp+16] ; blocks to read |
- | |
454 | - | ||
455 | call file_read |
- | |
456 | - | ||
457 | mov edi, [esp+0] |
- | |
458 | mov byte [edi], '/' |
- | |
459 | - | ||
460 | call free_hd_channel |
- | |
461 | and [hd1_status], 0 |
- | |
462 | jmp file_system_return |
- | |
463 | - | ||
464 | fs_noharddisk_read: |
- | |
465 | 432 | ||
466 | call free_hd_channel |
433 | call free_hd_channel |
Line 467... | Line 434... | ||
467 | and [hd1_status], 0 |
434 | and [hd1_status], 0 |
468 | 435 |