Rev 1018 | Rev 1289 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1018 | Rev 1275 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2008. 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: 1018 $ |
8 | $Revision: 1275 $ |
9 | 9 | ||
Line 313... | Line 313... | ||
313 | 313 | ||
314 | mov edi, [esi+handle] |
314 | mov edi, [esi+handle] |
315 | cmp [edi+SRV.magic], ' SRV' |
315 | cmp [edi+SRV.magic], ' SRV' |
Line 316... | Line 316... | ||
316 | jne .fail |
316 | jne .fail |
317 | 317 | ||
Line 318... | Line 318... | ||
318 | cmp [edi+SRV.size], SRV_SIZE |
318 | cmp [edi+SRV.size], SRV.sizeof |
319 | jne .fail |
319 | jne .fail |
320 | 320 | ||
Line 345... | Line 345... | ||
345 | 345 | ||
346 | mov eax, [ebx+handle] |
346 | mov eax, [ebx+handle] |
347 | cmp [eax+SRV.magic], ' SRV' |
347 | cmp [eax+SRV.magic], ' SRV' |
Line 348... | Line 348... | ||
348 | jne .fail |
348 | jne .fail |
349 | 349 | ||
Line 350... | Line 350... | ||
350 | cmp [eax+SRV.size], SRV_SIZE |
350 | cmp [eax+SRV.size], SRV.sizeof |
351 | jne .fail |
351 | jne .fail |
352 | 352 | ||
Line 400... | Line 400... | ||
400 | je .fail |
400 | je .fail |
Line 401... | Line 401... | ||
401 | 401 | ||
402 | cmp [handler], eax |
402 | cmp [handler], eax |
Line 403... | Line 403... | ||
403 | je .fail |
403 | je .fail |
404 | 404 | ||
405 | mov eax, SRV_SIZE |
405 | mov eax, SRV.sizeof |
406 | call malloc ;call alloc_service |
406 | call malloc |
Line 407... | Line 407... | ||
407 | test eax, eax |
407 | test eax, eax |
408 | jz .fail |
408 | jz .fail |
409 | 409 | ||
410 | push esi |
410 | push esi |
411 | push edi |
411 | push edi |
412 | mov edi, eax |
412 | mov edi, eax |
- | 413 | mov esi, [name] |
|
- | 414 | movsd |
|
413 | mov esi, [name] |
415 | movsd |
414 | mov ecx, 16/4 |
416 | movsd |
Line 415... | Line 417... | ||
415 | rep movsd |
417 | movsd |
416 | pop edi |
418 | pop edi |
Line 417... | Line 419... | ||
417 | pop esi |
419 | pop esi |
418 | 420 | ||
419 | mov [eax+SRV.magic], ' SRV' |
421 | mov [eax+SRV.magic], ' SRV' |
420 | mov [eax+SRV.size], SRV_SIZE |
422 | mov [eax+SRV.size], SRV.sizeof |
Line 609... | Line 611... | ||
609 | 611 | ||
610 | test eax, eax |
612 | test eax, eax |
Line 611... | Line 613... | ||
611 | jz .cleanup |
613 | jz .cleanup |
- | 614 | ||
- | 615 | mov [file2], eax |
|
612 | 616 | pushfd |
|
- | 617 | cli |
|
613 | mov [file2], eax |
618 | stdcall unpack, [file], eax |
614 | stdcall unpack, [file], eax |
619 | popfd |
615 | stdcall kernel_free, [file] |
620 | stdcall kernel_free, [file] |
616 | mov eax, [file2] |
621 | mov eax, [file2] |
617 | mov ebx, [file_size] |
622 | mov ebx, [file_size] |
Line 1082... | Line 1087... | ||
1082 | xor eax, eax |
1087 | xor eax, eax |
1083 | ret |
1088 | ret |
1084 | endp |
1089 | endp |
Line 1085... | Line 1090... | ||
1085 | 1090 | ||
1086 | align 4 |
1091 | align 4 |
1087 | proc stop_all_services |
1092 | stop_all_services: |
1088 | 1093 | push ebp |
|
1089 | mov edx, [srv.fd] |
1094 | mov edx, [srv.fd] |
1090 | .next: |
1095 | .next: |
1091 | cmp edx, srv.fd-SRV_FD_OFFSET |
1096 | cmp edx, srv.fd-SRV_FD_OFFSET |
1092 | je .done |
1097 | je .done |
1093 | cmp [edx+SRV.magic], ' SRV' |
1098 | cmp [edx+SRV.magic], ' SRV' |
1094 | jne .next |
1099 | jne .next |
1095 | cmp [edx+SRV.size], SRV_SIZE |
1100 | cmp [edx+SRV.size], SRV.sizeof |
Line 1096... | Line 1101... | ||
1096 | jne .next |
1101 | jne .next |
1097 | 1102 | ||
1098 | mov ebx, [edx+SRV.entry] |
1103 | mov ebx, [edx+SRV.entry] |
Line 1103... | Line 1108... | ||
1103 | push edx |
1108 | push edx |
1104 | stdcall ebx, dword -1 |
1109 | stdcall ebx, dword -1 |
1105 | pop edx |
1110 | pop edx |
1106 | jmp .next |
1111 | jmp .next |
1107 | .done: |
1112 | .done: |
- | 1113 | pop ebp |
|
1108 | ret |
1114 | ret |
1109 | endp |
- | |
Line 1110... | Line 1115... | ||
1110 | 1115 | ||
1111 | ; param |
1116 | ; param |
1112 | ; eax= size |
1117 | ; eax= size |