Rev 465 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 465 | Rev 495 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | $Revision: 465 $ |
1 | $Revision: 495 $ |
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 39... | Line 39... | ||
39 | file_system: |
39 | file_system: |
Line 40... | Line 40... | ||
40 | 40 | ||
41 | ; IN: |
41 | ; IN: |
42 | ; |
42 | ; |
43 | ; eax = 0 ; read file /RamDisk/First 6 |
- | |
44 | ; eax = 1 ; write file /RamDisk/First 33 /HardDisk/First 56 |
43 | ; eax = 0 ; read file /RamDisk/First 6 |
45 | ; eax = 8 ; lba read |
44 | ; eax = 8 ; lba read |
46 | ; eax = 15 ; get_disk_info |
45 | ; eax = 15 ; get_disk_info |
47 | ; |
46 | ; |
48 | ; OUT: |
47 | ; OUT: |
Line 261... | Line 260... | ||
261 | 260 | ||
Line 262... | Line 261... | ||
262 | jmp file_system_return |
261 | jmp file_system_return |
263 | - | ||
264 | - | ||
265 | fs_noramdisk_read: |
- | |
266 | - | ||
267 | cmp dword [esp+20],1 ; WRITE |
- | |
268 | jne fs_noramdisk_write |
- | |
269 | - | ||
270 | mov eax,[esp+4] ; fname |
- | |
271 | add eax,2*12+1 |
- | |
272 | mov ebx,[esp+8] ; buffer |
- | |
273 | mov ecx,[esp+12] ; count to write |
- | |
274 | mov edx,0 ; create new |
- | |
275 | call filesave |
- | |
276 | - | ||
277 | ; eax=0 ok - eax=1 not enough free space |
- | |
278 | - | ||
279 | jmp file_system_return |
262 | |
Line 280... | Line 263... | ||
280 | 263 | ||
281 | fs_noramdisk_write: |
264 | fs_noramdisk_read: |
282 | fs_noramdisk: |
265 | fs_noramdisk: |
Line 327... | Line 310... | ||
327 | 310 | ||
Line 328... | Line 311... | ||
328 | jmp file_system_return |
311 | jmp file_system_return |
329 | - | ||
330 | - | ||
331 | fs_noflpdisk_read: |
- | |
332 | - | ||
333 | cmp dword [esp+20],1 ; WRITE |
- | |
334 | jne fs_noflpdisk_write |
- | |
335 | - | ||
336 | mov eax,[esp+4] ; fname |
- | |
337 | add eax,2*12+1 |
- | |
338 | mov ebx,[esp+8] ; buffer |
- | |
339 | mov ecx,[esp+12] ; count to write |
- | |
340 | mov edx,0 ; create new |
- | |
341 | call floppy_filesave |
- | |
342 | - | ||
343 | ; eax=0 ok - eax=1 not enough free space |
- | |
344 | - | ||
345 | jmp file_system_return |
- | |
346 | 312 | ||
347 | fs_noflpdisk_write: |
313 | |
Line 348... | Line 314... | ||
348 | 314 | fs_noflpdisk_read: |
|
349 | fs_noflpdisk: |
315 | fs_noflpdisk: |
Line 474... | Line 440... | ||
474 | and [hd1_status], 0 |
440 | and [hd1_status], 0 |
475 | jmp file_system_return |
441 | jmp file_system_return |
Line 476... | Line 442... | ||
476 | 442 | ||
Line 477... | Line -... | ||
477 | fs_noharddisk_read: |
- | |
478 | - | ||
479 | - | ||
480 | cmp dword [esp+20],1 ; WRITE |
- | |
481 | jne fs_noharddisk_write |
- | |
482 | - | ||
483 | mov eax,[esp+0] ; /fname |
- | |
484 | mov byte [eax],0 ; path to asciiz |
- | |
485 | inc eax ; filename start |
- | |
486 | - | ||
487 | mov ebx,[esp+12] ; count to write |
- | |
488 | mov ecx,[esp+8] ; buffer |
- | |
489 | mov edx,[esp+4] |
- | |
490 | add edx,12*2 ; path start |
- | |
491 | - | ||
492 | call file_write |
- | |
493 | - | ||
494 | mov edi,[esp+0] |
- | |
495 | mov byte [edi],'/' |
- | |
496 | - | ||
497 | ; eax=0 ok - eax=1 not enough free space |
- | |
498 | - | ||
499 | call free_hd_channel |
- | |
500 | and [hd1_status], 0 |
- | |
501 | jmp file_system_return |
- | |
502 | - | ||
503 | - | ||
504 | fs_noharddisk_write: |
- | |
505 | 443 | fs_noharddisk_read: |
|
506 | 444 | ||
Line 507... | Line 445... | ||
507 | call free_hd_channel |
445 | call free_hd_channel |
508 | and [hd1_status], 0 |
446 | and [hd1_status], 0 |