Subversion Repositories Kolibri OS

Rev

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

Rev 431 Rev 465
Line 1... Line 1...
1
$Revision: 431 $
1
$Revision: 465 $
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3
;;                                                              ;;
3
;;                                                                      ;;
4
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
4
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
5
;; Distributed under terms of the GNU General Public License    ;;
5
;; Distributed under terms of the GNU General Public License    ;;
6
;;                                                              ;;
6
;;                                                              ;;
Line 84... Line 84...
84
; ebx is not changed
84
; ebx is not changed
Line 85... Line 85...
85
 
85
 
Line 86... Line 86...
86
; \end{diamond}[18.03.2006]
86
; \end{diamond}[18.03.2006]
87
 
87
 
Line 88... Line 88...
88
    ; Extract parameters
88
    ; Extract parameters
89
    add    eax, std_application_base_address    ; abs start of info block
89
 ;   add    eax, std_application_base_address    ; abs start of info block
Line 90... Line 90...
90
 
90
 
91
    cmp   dword [eax+0],15      ; GET_DISK_INFO
91
    cmp   dword [eax+0],15      ; GET_DISK_INFO
92
    je    fs_info
92
    je    fs_info
93
 
93
 
94
    cmp   dword [CURRENT_TASK],1      ; no memory checks for kernel requests
94
    cmp   dword [CURRENT_TASK],1      ; no memory checks for kernel requests
95
    jz    no_checks_for_kernel
95
    jz    no_checks_for_kernel
96
    mov   edx,eax
96
    mov   edx,eax
97
    cmp   dword [eax+0],1
97
    cmp   dword [eax+0],1
98
    jnz   .usual_check
98
    jnz   .usual_check
99
    mov   ebx,[eax+12]
99
    mov   ebx,[eax+12]
100
    add   ebx,std_application_base_address
100
 ;   add   ebx,std_application_base_address
Line 118... Line 118...
118
    jnz   .small_size
118
    jnz   .small_size
119
    mov   ecx,[eax+8]
119
    mov   ecx,[eax+8]
120
    shl   ecx,9
120
    shl   ecx,9
121
.small_size:
121
.small_size:
122
    mov   ebx,[eax+12]
122
    mov   ebx,[eax+12]
123
    add   ebx,std_application_base_address
123
 ;   add   ebx,std_application_base_address
124
    call  check_region
124
    call  check_region
125
    test  eax,eax
125
    test  eax,eax
126
    jz    .error_output
126
    jz    .error_output
127
  area_in_app_mem:
127
  area_in_app_mem:
128
    mov   eax,edx
128
    mov   eax,edx
Line 146... Line 146...
146
    ret
146
    ret
147
.read_root:
147
.read_root:
148
; \end{diamond}[18.03.2006]
148
; \end{diamond}[18.03.2006]
149
    mov   esi,dir0
149
    mov   esi,dir0
150
    mov   edi,[eax+12]
150
    mov   edi,[eax+12]
151
    add   edi,std_application_base_address
151
 ;   add   edi,std_application_base_address
152
    mov   ecx,11
152
    mov   ecx,11
153
    push  ecx
153
    push  ecx
154
;    cld    ; already is
154
;    cld    ; already is
155
    rep   movsb
155
    rep   movsb
156
    mov   al,0x10
156
    mov   al,0x10
Line 200... Line 200...
200
 
200
 
201
    push  dword [eax+0]         ; read/write/delete/.../makedir/rename/lba/run
201
    push  dword [eax+0]         ; read/write/delete/.../makedir/rename/lba/run
202
    push  dword [eax+4]         ; 512 block number to read
202
    push  dword [eax+4]         ; 512 block number to read
203
    push  dword [eax+8]         ; bytes to write/append or 512 blocks to read
203
    push  dword [eax+8]         ; bytes to write/append or 512 blocks to read
204
    mov   ebx,[eax+12]
204
    mov   ebx,[eax+12]
205
    add   ebx,std_application_base_address
205
 ;   add   ebx,std_application_base_address
Line 206... Line 206...
206
    push  ebx                   ; abs start of return/save area
206
    push  ebx                   ; abs start of return/save area
207
 
207
 
208
    lea   esi,[eax+20]          ; abs start of dir + filename
208
    lea   esi,[eax+20]          ; abs start of dir + filename
Line 209... Line 209...
209
    mov   edi,[eax+16]
209
    mov   edi,[eax+16]
Line 210... Line 210...
210
    add   edi,std_application_base_address    ; abs start of work area
210
 ;   add   edi,std_application_base_address    ; abs start of work area
211
 
211