Subversion Repositories Kolibri OS

Rev

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

Rev 3539 Rev 3598
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: 3539 $
11
$Revision: 3598 $
12
 
12
 
13
 
13
 
Line 1309... Line 1309...
1309
; we need to save LFN <=> LFN is not equal to short name <=> generated name contains '~'
1309
; we need to save LFN <=> LFN is not equal to short name <=> generated name contains '~'
1310
        mov     al, '~'
1310
        mov     al, '~'
1311
        push    ecx edi
1311
        push    ecx edi
1312
        mov     ecx, 8
1312
        mov     ecx, 8
1313
        repnz scasb
1313
        repnz scasb
1314
        push    1
-
 
1315
        pop     eax     ; 1 entry
1314
        movi    eax, 1     ; 1 entry
1316
        jnz     .notilde
1315
        jnz     .notilde
1317
; we need ceil(strlen(esi)/13) additional entries = floor((strlen(esi)+12+13)/13) total
1316
; we need ceil(strlen(esi)/13) additional entries = floor((strlen(esi)+12+13)/13) total
1318
        xor     eax, eax
1317
        xor     eax, eax
1319
@@:
1318
@@:
1320
        cmp     byte [esi], 0
1319
        cmp     byte [esi], 0
Line 1820... Line 1819...
1820
        jz      .fat_err
1819
        jz      .fat_err
1821
        cmp     eax, 0xFF8
1820
        cmp     eax, 0xFF8
1822
        jb      @b
1821
        jb      @b
1823
.fat_err:
1822
.fat_err:
1824
        pop     ecx
1823
        pop     ecx
1825
        push    ERROR_FAT_TABLE
1824
        movi    eax, ERROR_FAT_TABLE
1826
        pop     eax
-
 
1827
        stc
1825
        stc
1828
        ret
1826
        ret
1829
@@:
1827
@@:
1830
        push    eax
1828
        push    eax
1831
        mov     eax, [eax*2+FLOPPY_FAT]
1829
        mov     eax, [eax*2+FLOPPY_FAT]
Line 1883... Line 1881...
1883
        ret
1881
        ret
1884
.disk_full:
1882
.disk_full:
1885
        pop     edi ecx
1883
        pop     edi ecx
1886
        pop     esi edx
1884
        pop     esi edx
1887
        stc
1885
        stc
1888
        push    ERROR_DISK_FULL
1886
        movi    eax, ERROR_DISK_FULL
1889
        pop     eax
-
 
1890
        ret
1887
        ret
Line 1891... Line 1888...
1891
 
1888
 
1892
;----------------------------------------------------------------
1889
;----------------------------------------------------------------
1893
;
1890
;