Subversion Repositories Kolibri OS

Rev

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 6... Line 6...
6
;; FAT12.INC                                                    ;;
6
;; FAT12.INC                                                    ;;
7
;; (C) 2005 Mario79, License: GPL                               ;;
7
;; (C) 2005 Mario79, License: GPL                               ;;
8
;;                                                              ;;
8
;;                                                              ;;
9
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
9
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 10... Line 10...
10
 
10
 
Line 11... Line 11...
11
$Revision: 2465 $
11
$Revision: 2987 $
12
 
12
 
13
 
13
 
Line 632... Line 632...
632
fat_find_lfn:
632
fat_find_lfn:
633
; in: esi->name
633
; in: esi->name
634
;     [esp+4] = next
634
;     [esp+4] = next
635
;     [esp+8] = first
635
;     [esp+8] = first
636
;     [esp+C]... - possibly parameters for first and next
636
;     [esp+C]... - possibly parameters for first and next
637
; out: CF=1 - file not found
637
; out: CF=1 - file not found, eax=error code
638
;      else CF=0, esi->next name component, edi->direntry
638
;      else CF=0, esi->next name component, edi->direntry
639
        pusha
639
        pusha
640
        lea     eax, [esp+0Ch+20h]
640
        lea     eax, [esp+0Ch+20h]
641
        call    dword [eax-4]
641
        call    dword [eax-4]
642
        jc      .reterr
642
        jc      .reterr
643
        sub     esp, 262*2      ; reserve place for LFN
643
        sub     esp, 262*2      ; reserve place for LFN
644
        mov     ebp, esp
-
 
645
        push    0               ; for fat_get_name: read ASCII name
644
        push    0               ; for fat_get_name: read ASCII name
646
.l1:
645
.l1:
-
 
646
        lea     ebp, [esp+4]
647
        call    fat_get_name
647
        call    fat_get_name
648
        jc      .l2
648
        jc      .l2
649
        call    fat_compare_name
649
        call    fat_compare_name
650
        jz      .found
650
        jz      .found
651
.l2:
651
.l2:
-
 
652
        mov     ebp, [esp+8+262*2+4]
652
        lea     eax, [esp+0Ch+20h+262*2+4]
653
        lea     eax, [esp+0Ch+20h+262*2+4]
653
        call    dword [eax-8]
654
        call    dword [eax-8]
654
        jnc     .l1
655
        jnc     .l1
655
        add     esp, 262*2+4
656
        add     esp, 262*2+4
656
.reterr:
657
.reterr:
-
 
658
        mov     [esp+28], eax
657
        stc
659
        stc
658
        popa
660
        popa
659
        ret
661
        ret
660
.found:
662
.found:
661
        add     esp, 262*2+4
663
        add     esp, 262*2+4
-
 
664
        mov     ebp, [esp+8]
662
; if this is LFN entry, advance to true entry
665
; if this is LFN entry, advance to true entry
663
        cmp     byte [edi+11], 0xF
666
        cmp     byte [edi+11], 0xF
664
        jnz     @f
667
        jnz     @f
665
        lea     eax, [esp+0Ch+20h]
668
        lea     eax, [esp+0Ch+20h]
666
        call    dword [eax-8]
669
        call    dword [eax-8]