Rev 3500 | Rev 3908 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3500 | Rev 3555 | ||
---|---|---|---|
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: 3500 $ |
8 | $Revision: 3555 $ |
9 | 9 | ||
Line 140... | Line 140... | ||
140 | jne .fail |
140 | jne .fail |
Line 141... | Line 141... | ||
141 | 141 | ||
142 | cmp [edi+SRV.size], sizeof.SRV |
142 | cmp [edi+SRV.size], sizeof.SRV |
Line 143... | Line 143... | ||
143 | jne .fail |
143 | jne .fail |
- | 144 | ||
- | 145 | ; stdcall [edi+SRV.srv_proc], esi |
|
- | 146 | mov eax, [edi+SRV.srv_proc] |
|
- | 147 | test eax, eax |
|
144 | 148 | jz .fail |
|
145 | stdcall [edi+SRV.srv_proc], esi |
149 | stdcall eax, esi |
146 | ret |
150 | ret |
147 | .fail: |
151 | .fail: |
148 | xor eax, eax |
152 | xor eax, eax |
Line 172... | Line 176... | ||
172 | jne .fail |
176 | jne .fail |
Line 173... | Line 177... | ||
173 | 177 | ||
174 | cmp [eax+SRV.size], sizeof.SRV |
178 | cmp [eax+SRV.size], sizeof.SRV |
Line 175... | Line 179... | ||
175 | jne .fail |
179 | jne .fail |
- | 180 | ||
- | 181 | ; stdcall [eax+SRV.srv_proc], ecx |
|
- | 182 | mov eax, [eax+SRV.srv_proc] |
|
- | 183 | test eax, eax |
|
176 | 184 | jz .fail |
|
177 | stdcall [eax+SRV.srv_proc], ecx |
185 | stdcall eax, ecx |
178 | ret |
186 | ret |
179 | .fail: |
187 | .fail: |
Line 211... | Line 219... | ||
211 | .ok: |
219 | .ok: |
212 | mov eax, edx |
220 | mov eax, edx |
213 | ret |
221 | ret |
214 | endp |
222 | endp |
Line -... | Line 223... | ||
- | 223 | ||
- | 224 | reg_service: |
|
- | 225 | xor eax, eax |
|
- | 226 | mov ecx, [esp+8] |
|
- | 227 | jecxz .nothing |
|
- | 228 | push sizeof.SRV |
|
- | 229 | push ecx |
|
- | 230 | pushd [esp+12] |
|
215 | 231 | call reg_service_ex |
|
- | 232 | .nothing: |
|
- | 233 | ret 8 |
|
- | 234 | ||
- | 235 | reg_usb_driver: |
|
- | 236 | push sizeof.USBSRV |
|
- | 237 | pushd [esp+12] |
|
- | 238 | pushd [esp+12] |
|
- | 239 | call reg_service_ex |
|
- | 240 | test eax, eax |
|
- | 241 | jz .nothing |
|
- | 242 | mov ecx, [esp+12] |
|
- | 243 | mov [eax+USBSRV.usb_func], ecx |
|
- | 244 | .nothing: |
|
- | 245 | ret 12 |
|
216 | align 4 |
246 | |
Line 217... | Line 247... | ||
217 | proc reg_service stdcall, name:dword, handler:dword |
247 | proc reg_service_ex stdcall, name:dword, handler:dword, srvsize:dword |
Line 218... | Line 248... | ||
218 | 248 | ||
Line 219... | Line 249... | ||
219 | push ebx |
249 | push ebx |
220 | 250 | ||
Line 221... | Line 251... | ||
221 | xor eax, eax |
251 | xor eax, eax |
222 | 252 | ||
Line 223... | Line 253... | ||
223 | cmp [name], eax |
253 | cmp [name], eax |
224 | je .fail |
254 | je .fail |
225 | 255 | ||
226 | cmp [handler], eax |
256 | ; cmp [handler], eax |
Line 227... | Line 257... | ||
227 | je .fail |
257 | ; je .fail |