Subversion Repositories Kolibri OS

Rev

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

Rev 388 Rev 419
Line 78... Line 78...
78
; ebx is not changed
78
; ebx is not changed
Line 79... Line 79...
79
 
79
 
Line 80... Line 80...
80
; \end{diamond}[18.03.2006]
80
; \end{diamond}[18.03.2006]
81
 
81
 
Line 82... Line 82...
82
    ; Extract parameters
82
    ; Extract parameters
83
    add    eax, std_application_base_address    ; abs start of info block
83
 ;   add    eax, std_application_base_address    ; abs start of info block
Line 84... Line 84...
84
 
84
 
85
    cmp   dword [eax+0],15      ; GET_DISK_INFO
85
    cmp   dword [eax+0],15      ; GET_DISK_INFO
86
    je    fs_info
86
    je    fs_info
87
 
87
 
88
    cmp   dword [CURRENT_TASK],1      ; no memory checks for kernel requests
88
    cmp   dword [CURRENT_TASK],1      ; no memory checks for kernel requests
89
    jz    no_checks_for_kernel
89
    jz    no_checks_for_kernel
90
    mov   edx,eax
90
    mov   edx,eax
91
    cmp   dword [eax+0],1
91
    cmp   dword [eax+0],1
92
    jnz   .usual_check
92
    jnz   .usual_check
93
    mov   ebx,[eax+12]
93
    mov   ebx,[eax+12]
94
    add   ebx,std_application_base_address
94
 ;   add   ebx,std_application_base_address
Line 112... Line 112...
112
    jnz   .small_size
112
    jnz   .small_size
113
    mov   ecx,[eax+8]
113
    mov   ecx,[eax+8]
114
    shl   ecx,9
114
    shl   ecx,9
115
.small_size:
115
.small_size:
116
    mov   ebx,[eax+12]
116
    mov   ebx,[eax+12]
117
    add   ebx,std_application_base_address
117
 ;   add   ebx,std_application_base_address
118
    call  check_region
118
    call  check_region
119
    test  eax,eax
119
    test  eax,eax
120
    jz    .error_output
120
    jz    .error_output
121
  area_in_app_mem:
121
  area_in_app_mem:
122
    mov   eax,edx
122
    mov   eax,edx
Line 140... Line 140...
140
    ret
140
    ret
141
.read_root:
141
.read_root:
142
; \end{diamond}[18.03.2006]
142
; \end{diamond}[18.03.2006]
143
    mov   esi,dir0
143
    mov   esi,dir0
144
    mov   edi,[eax+12]
144
    mov   edi,[eax+12]
145
    add   edi,std_application_base_address
145
 ;   add   edi,std_application_base_address
146
    mov   ecx,11
146
    mov   ecx,11
147
    push  ecx
147
    push  ecx
148
;    cld    ; already is
148
;    cld    ; already is
149
    rep   movsb
149
    rep   movsb
150
    mov   al,0x10
150
    mov   al,0x10
Line 194... Line 194...
194
 
194
 
195
    push  dword [eax+0]         ; read/write/delete/.../makedir/rename/lba/run
195
    push  dword [eax+0]         ; read/write/delete/.../makedir/rename/lba/run
196
    push  dword [eax+4]         ; 512 block number to read
196
    push  dword [eax+4]         ; 512 block number to read
197
    push  dword [eax+8]         ; bytes to write/append or 512 blocks to read
197
    push  dword [eax+8]         ; bytes to write/append or 512 blocks to read
198
    mov   ebx,[eax+12]
198
    mov   ebx,[eax+12]
199
    add   ebx,std_application_base_address
199
 ;   add   ebx,std_application_base_address
Line 200... Line 200...
200
    push  ebx                   ; abs start of return/save area
200
    push  ebx                   ; abs start of return/save area
201
 
201
 
202
    lea   esi,[eax+20]          ; abs start of dir + filename
202
    lea   esi,[eax+20]          ; abs start of dir + filename
Line 203... Line 203...
203
    mov   edi,[eax+16]
203
    mov   edi,[eax+16]
Line 204... Line 204...
204
    add   edi,std_application_base_address    ; abs start of work area
204
 ;   add   edi,std_application_base_address    ; abs start of work area
205
 
205