Rev 4265 | Rev 5201 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4265 | Rev 4423 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2012. 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: 4265 $ |
8 | $Revision: 4423 $ |
9 | 9 | ||
Line 126... | Line 126... | ||
126 | je .ok |
126 | je .ok |
Line 127... | Line 127... | ||
127 | 127 | ||
128 | mov edx, [edx+SRV.fd] |
128 | mov edx, [edx+SRV.fd] |
129 | jmp @B |
129 | jmp @B |
- | 130 | .not_load: |
|
- | 131 | mov eax, [sz_name] |
|
- | 132 | ; Try to load .dll driver first. If not, fallback to .obj. |
|
- | 133 | push edi |
|
- | 134 | sub esp, 36 |
|
- | 135 | mov edi, esp |
|
- | 136 | mov dword [edi], '/sys' |
|
- | 137 | mov dword [edi+4], '/dri' |
|
- | 138 | mov dword [edi+8], 'vers' |
|
- | 139 | mov byte [edi+12], '/' |
|
- | 140 | @@: |
|
- | 141 | mov dl, [eax] |
|
- | 142 | mov [edi+13], dl |
|
- | 143 | inc eax |
|
- | 144 | inc edi |
|
- | 145 | test dl, dl |
|
- | 146 | jnz @b |
|
- | 147 | mov dword [edi+12], '.sys' |
|
- | 148 | mov byte [edi+16], 0 |
|
- | 149 | mov edi, esp |
|
- | 150 | stdcall load_pe_driver, edi, 0 |
|
- | 151 | add esp, 36 |
|
- | 152 | pop edi |
|
- | 153 | test eax, eax |
|
130 | .not_load: |
154 | jnz .nothing |
131 | pop ebp |
155 | pop ebp |
132 | jmp load_driver |
156 | jmp load_driver |
133 | .ok: |
157 | .ok: |
- | 158 | mov eax, edx |
|
134 | mov eax, edx |
159 | .nothing: |
135 | ret |
160 | ret |
Line 136... | Line 161... | ||
136 | endp |
161 | endp |
137 | 162 | ||
Line 320... | Line 345... | ||
320 | 345 | ||
321 | ; description |
346 | ; description |
322 | ; allocate kernel memory and loads the specified file |
347 | ; allocate kernel memory and loads the specified file |
323 | ; |
348 | ; |
324 | ; param |
349 | ; param |
325 | ; file_name= full path to file |
350 | ; file_name= path to file |
326 | ; |
351 | ; |
327 | ; retval |
352 | ; retval |
328 | ; eax= file image in kernel memory |
353 | ; eax= file image in kernel memory |
329 | ; ebx= size of file |
354 | ; ebx= size of file |