Subversion Repositories Kolibri OS

Rev

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

Rev 709 Rev 1124
Line 42... Line 42...
42
;;  20.5.2002  Hd status check - VT                                ;;
42
;;  20.5.2002  Hd status check - VT                                ;;
43
;;  29.6.2002  Improved fat32 verification - VT                    ;;
43
;;  29.6.2002  Improved fat32 verification - VT                    ;;
44
;;                                                                 ;;
44
;;                                                                 ;;
45
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
45
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 46... Line 46...
46
 
46
 
Line 47... Line 47...
47
$Revision: 709 $
47
$Revision: 1124 $
Line 48... Line 48...
48
 
48
 
Line 1060... Line 1060...
1060
.noaccess_2:
1060
.noaccess_2:
1061
    or    ebx, -1
1061
    or    ebx, -1
1062
    mov    eax, ERROR_ACCESS_DENIED
1062
    mov    eax, ERROR_ACCESS_DENIED
1063
    ret
1063
    ret
Line 1064... Line -...
1064
 
-
 
1065
.noaccess_3:
-
 
1066
    add esp,4
-
 
1067
.noaccess_1:
-
 
1068
    add esp,4
-
 
1069
.noaccess_4:
-
 
1070
    add esp,4*5
-
 
1071
    jmp  .noaccess_2
-
 
1072
 
1064
 
1073
@@:
1065
@@:
1074
    call    hd_find_lfn
1066
    call    hd_find_lfn
1075
    jnc    .found
1067
    jnc    .found
1076
    pop    edi
1068
    pop    edi
Line 1131... Line 1123...
1131
    jb    .force_buf
1123
    jb    .force_buf
1132
; we may read directly to given buffer
1124
; we may read directly to given buffer
1133
    push    ebx
1125
    push    ebx
1134
    mov    ebx, edx
1126
    mov    ebx, edx
1135
    call    hd_read
1127
    call    hd_read
-
 
1128
    pop    ebx
1136
    cmp  [hd_error],0
1129
    cmp  [hd_error],0
1137
    jne  .noaccess_1
1130
    jne  .noaccess_1
1138
    pop    ebx
-
 
1139
    add    edx, 512
1131
    add    edx, 512
1140
    sub    ecx, 512
1132
    sub    ecx, 512
1141
    jmp    .skip
1133
    jmp    .skip
1142
.force_buf:
1134
.force_buf:
1143
; we must read sector to temporary buffer and then copy it to destination
1135
; we must read sector to temporary buffer and then copy it to destination
1144
    push    eax ebx
1136
    push    eax ebx
1145
    mov    ebx, buffer
1137
    mov    ebx, buffer
1146
    call    hd_read
1138
    call    hd_read
1147
    cmp  [hd_error],0
-
 
1148
    jne  .noaccess_3
-
 
1149
 
-
 
1150
    mov    eax, ebx
1139
    mov    eax, ebx
1151
    pop    ebx
1140
    pop    ebx
-
 
1141
    cmp  [hd_error],0
-
 
1142
    jne  .noaccess_3
1152
    add    eax, ebx
1143
    add    eax, ebx
1153
    push    ecx
1144
    push    ecx
1154
    add    ecx, ebx
1145
    add    ecx, ebx
1155
    cmp    ecx, 512
1146
    cmp    ecx, 512
1156
    jbe    @f
1147
    jbe    @f
Line 1169... Line 1160...
1169
    dec    edi
1160
    dec    edi
1170
    jnz    .new_sector
1161
    jnz    .new_sector
1171
    mov    eax, [cluster_tmp]
1162
    mov    eax, [cluster_tmp]
1172
    call    get_FAT
1163
    call    get_FAT
1173
    cmp   [hd_error],0
1164
    cmp   [hd_error],0
1174
    jne   .noaccess_4
1165
    jne   .noaccess_1
Line 1175... Line 1166...
1175
 
1166
 
-
 
1167
    jmp    .new_cluster
-
 
1168
.noaccess_3:
-
 
1169
        pop     eax
-
 
1170
.noaccess_1:
-
 
1171
        pop     eax
1176
    jmp    .new_cluster
1172
        push    11
1177
.done:
1173
.done:
1178
        mov     ebx, edx
1174
        mov     ebx, edx
1179
        pop     eax edx ecx edi
1175
        pop     eax edx ecx edi
1180
        sub     ebx, edx
1176
        sub     ebx, edx