Subversion Repositories Kolibri OS

Rev

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

Rev 5089 Rev 5095
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2011-2014. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2011-2014. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 5089 $
8
$Revision: 5095 $
9
 
9
 
10
; Read/write functions try to do large operations,
10
; Read/write functions try to do large operations,
11
; it is significantly faster than several small operations.
11
; it is significantly faster than several small operations.
Line 47... Line 47...
47
; in: ebp -> PARTITION
47
; in: ebp -> PARTITION
48
; out: eax = error code, 0 = ok
48
; out: eax = error code, 0 = ok
49
; out: ecx = number of sectors that were read
49
; out: ecx = number of sectors that were read
50
fs_read64_sys:
50
fs_read64_sys:
51
; Save ebx, set ebx to SysCache and let the common part do its work.
51
; Save ebx, set ebx to SysCache and let the common part do its work.
52
        push    ebx
52
        push    ebx ebx
53
        mov     ebx, [ebp+PARTITION.Disk]
53
        mov     ebx, [ebp+PARTITION.Disk]
54
        add     ebx, DISK.SysCache
54
        add     ebx, DISK.SysCache
55
        jmp     fs_read64_common
55
        jmp     fs_read64_common
Line 56... Line 56...
56
 
56
 
Line 61... Line 61...
61
; in: ebp -> PARTITION
61
; in: ebp -> PARTITION
62
; out: eax = error code, 0 = ok
62
; out: eax = error code, 0 = ok
63
; out: ecx = number of sectors that were read
63
; out: ecx = number of sectors that were read
64
fs_read64_app:
64
fs_read64_app:
65
; Save ebx, set ebx to AppCache and let the common part do its work.
65
; Save ebx, set ebx to AppCache and let the common part do its work.
66
        push    ebx
66
        push    ebx ebx
67
        mov     ebx, [ebp+PARTITION.Disk]
67
        mov     ebx, [ebp+PARTITION.Disk]
68
        add     ebx, DISK.AppCache
68
        add     ebx, DISK.AppCache
Line 69... Line 69...
69
 
69
 
70
; Common part of fs_read64_{app,sys}:
70
; Common part of fs_read64_{app,sys}:
Line 160... Line 160...
160
        mov     eax, [.error_code]
160
        mov     eax, [.error_code]
161
        mov     ecx, [.num_sectors_orig]
161
        mov     ecx, [.num_sectors_orig]
162
        sub     ecx, [.num_sectors]
162
        sub     ecx, [.num_sectors]
163
.nothing:
163
.nothing:
164
        add     esp, .local_vars_size
164
        add     esp, .local_vars_size
165
        pop     edi esi ebx     ; restore used registers to be stdcall
165
        pop     edi esi ebx ebx    ; restore used registers to be stdcall
166
        ret
166
        ret
167
.not_found_in_cache:
167
.not_found_in_cache:
168
; Release the lock acquired at 6a.
168
; Release the lock acquired at 6a.
169
        mov     ecx, [ebp+PARTITION.Disk]
169
        mov     ecx, [ebp+PARTITION.Disk]
170
        add     ecx, DISK.CacheLock
170
        add     ecx, DISK.CacheLock