Subversion Repositories Kolibri OS

Rev

Rev 83 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 83 Rev 88
Line 40... Line 40...
40
; eax = 2  ; delete file        /RamDisk/First 32   /HardDisk/First 57
40
; eax = 2  ; delete file        /RamDisk/First 32   /HardDisk/First 57
41
; eax = 3  ; append to a file   /RamDisk/First ??   /HardDisk/First ??
41
; eax = 3  ; append to a file   /RamDisk/First ??   /HardDisk/First ??
42
; eax = 4  ; makedir
42
; eax = 4  ; makedir
43
; eax = 5  ; rename file/directory
43
; eax = 5  ; rename file/directory
44
; eax = 8  ; lba read
44
; eax = 8  ; lba read
45
; eax = 12 ; get_filesize
-
 
46
; eax = 13 ; get_fileattr
-
 
47
; eax = 14 ; get_filedate
-
 
48
; eax = 15 ; get_disk_info
45
; eax = 15 ; get_disk_info
49
; eax = 16 ; start application
46
; eax = 16 ; start application
50
;
47
;
51
; OUT:
48
; OUT:
52
;
49
;
Line 89... Line 86...
89
; \end{diamond}[18.03.2006]
86
; \end{diamond}[18.03.2006]
Line 90... Line 87...
90
 
87
 
91
    ; Extract parameters
88
    ; Extract parameters
Line 92... Line -...
92
    add    eax, std_application_base_address    ; abs start of info block
-
 
93
 
-
 
94
    cmp   dword [eax+0],12      ; Get file size
-
 
95
    je    fs_read
-
 
96
    cmp   dword [eax+0],13      ; Get file attribute
-
 
97
    je    fs_read
-
 
98
    cmp   dword [eax+0],14      ; Get file date/time
89
    add    eax, std_application_base_address    ; abs start of info block
99
    je    fs_read
90
 
100
    cmp   dword [eax+0],15      ; GET_DISK_INFO
91
    cmp   dword [eax+0],15      ; GET_DISK_INFO
101
    je    fs_info
92
    je    fs_info
102
    cmp   dword [eax+0],16      ; RUN - dont care about read&write blocks
93
    cmp   dword [eax+0],16      ; RUN - dont care about read&write blocks
Line 336... Line 327...
336
    add   eax,2*12+1
327
    add   eax,2*12+1
337
    call  filedelete
328
    call  filedelete
338
    jmp   file_system_return
329
    jmp   file_system_return
Line 339... Line 330...
339
 
330
 
340
  fs_noramdisk_delete:
-
 
341
    cmp   dword [esp+20],12     ;GET TIME,DATE,SIZE AND ATTRS
-
 
342
    jb    fs_noramdisk_getinfo
-
 
343
    cmp   dword [esp+20],14
-
 
344
    ja    fs_noramdisk_getinfo
-
 
345
    mov   eax,[esp+4]           ; fname
-
 
346
    add   eax,2*12+1
-
 
347
    mov   ebx,[esp+20]
-
 
348
    mov   ecx,[esp+0]
-
 
349
    sub   ecx,eax
-
 
350
    add   ecx,12+1              ; file name length
-
 
351
    call  rd_getfileinfo
-
 
352
    jmp   file_system_return
-
 
353
  fs_noramdisk_getinfo:             ;End of code - Mihasik
-
 
354
 
331
  fs_noramdisk_delete:
Line 355... Line 332...
355
  fs_noramdisk:
332
  fs_noramdisk:
356
  
333
  
357
  ;********************************************************************
334
  ;********************************************************************
Line 710... Line 687...
710
    mov   eax,4                 ; partition not defined at hd
687
    mov   eax,4                 ; partition not defined at hd
711
    jmp   file_system_return
688
    jmp   file_system_return
Line 712... Line 689...
712
 
689
 
Line 713... Line -...
713
  fs_noharddisk_rename:
-
 
714
 
-
 
715
    cmp   dword [esp+20],12     ; get FILESIZE
-
 
716
    jne   fs_noharddisk_get_filesize
-
 
717
 
-
 
718
    mov   eax,[esp+0]           ; /fname
-
 
719
    lea   edi,[eax+12]
-
 
720
    mov   byte [eax],0          ; path to asciiz
-
 
721
    inc   eax                   ; filename start
-
 
722
    mov   edx,[esp+4]
-
 
723
    add   edx,12*2              ; path start
-
 
724
    sub   edi,edx               ; path length
-
 
725
 
-
 
726
    call  get_filesize
-
 
727
 
-
 
728
    mov   edi,[esp+0]
-
 
729
    mov   byte [edi],'/'
-
 
730
 
-
 
731
    jmp   file_system_return
-
 
732
 
-
 
733
  fs_noharddisk_get_filesize:
-
 
734
 
-
 
735
    cmp   dword [esp+20],13     ; get FILEATTR
-
 
736
    jne   fs_noharddisk_get_fileattr
-
 
737
 
-
 
738
    mov   eax,[esp+0]           ; /dirname
-
 
739
    mov   byte [eax],0          ; path to asciiz
-
 
740
    inc   eax                   ; filename start
-
 
741
    mov   edx,[esp+4]
-
 
742
    add   edx,12*2              ; path start
-
 
743
 
-
 
744
    call  get_fileattr
-
 
745
 
-
 
746
    mov   edi,[esp+0]
-
 
747
    mov   byte [edi],'/'
-
 
748
 
-
 
749
    jmp   file_system_return
-
 
750
 
-
 
751
  fs_noharddisk_get_fileattr:
-
 
752
 
-
 
753
    cmp   dword [esp+20],14     ; get FILEDATE
-
 
754
    jne   fs_noharddisk_get_filedate
-
 
755
 
-
 
756
    mov   eax,[esp+0]           ; /dirname
-
 
757
    mov   byte [eax],0          ; path to asciiz
-
 
758
    inc   eax                   ; filename start
-
 
759
    mov   edx,[esp+4]
-
 
760
    add   edx,12*2              ; path start
-
 
761
 
-
 
762
    call  get_filedate
-
 
763
 
-
 
764
    mov   edi,[esp+0]
-
 
765
    mov   byte [edi],'/'
-
 
766
 
-
 
767
    jmp   file_system_return
-
 
768
 
-
 
769
  fs_noharddisk_get_filedate:
690
  fs_noharddisk_rename:
770
 
691
 
Line 771... Line 692...
771
    cmp   dword [esp+20],16     ; START APPLICATION
692
    cmp   dword [esp+20],16     ; START APPLICATION
772
    jne   fs_noharddisk_start_application
693
    jne   fs_noharddisk_start_application