Subversion Repositories Kolibri OS

Rev

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

Rev 2465 Rev 2987
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: 2465 $
8
$Revision: 2987 $
Line 9... Line 9...
9
 
9
 
Line 70... Line 70...
70
         save_cr3      dd ?
70
         save_cr3      dd ?
71
         slot      dd ?
71
         slot      dd ?
72
         slot_base     dd ?
72
         slot_base     dd ?
73
         file_base     dd ?
73
         file_base     dd ?
74
         file_size     dd ?
74
         file_size     dd ?
-
 
75
         handle        dd ? ;temp. for default cursor handle for curr. thread
75
                      ;app header data
76
                      ;app header data
76
         hdr_cmdline   dd ? ;0x00
77
         hdr_cmdline   dd ? ;0x00
77
         hdr_path      dd ? ;0x04
78
         hdr_path      dd ? ;0x04
78
         hdr_eip       dd ? ;0x08
79
         hdr_eip       dd ? ;0x08
79
         hdr_esp       dd ? ;0x0C
80
         hdr_esp       dd ? ;0x0C
Line 81... Line 82...
81
         hdr_i_end     dd ? ;0x14
82
         hdr_i_end     dd ? ;0x14
82
       endl
83
       endl
Line 83... Line 84...
83
 
84
 
Line -... Line 85...
-
 
85
        pushad
-
 
86
 
-
 
87
        cmp     [SCR_MODE], word 0x13
-
 
88
        jbe     @f
-
 
89
        pushad
-
 
90
        stdcall set_cursor, [def_cursor_clock]
-
 
91
        mov     [handle], eax
-
 
92
        mov     [redrawmouse_unconditional], 1
-
 
93
        call    __sys_draw_pointer
84
        pushad
94
        popad
Line 85... Line 95...
85
 
95
@@:
Line 86... Line 96...
86
        mov     [flags], edx
96
        mov     [flags], edx
Line 111... Line 121...
111
        jnz     @b
121
        jnz     @b
112
        jmp     .namecopied
122
        jmp     .namecopied
113
.bigfilename:
123
.bigfilename:
114
        popad
124
        popad
115
        mov     eax, -ERROR_FILE_NOT_FOUND
125
        mov     eax, -ERROR_FILE_NOT_FOUND
-
 
126
 
116
        ret
127
        jmp     .final
Line 117... Line 128...
117
 
128
 
Line 118... Line 129...
118
.namecopied:
129
.namecopied:
119
 
130
 
Line 125... Line 136...
125
        mov     dword [eax+252], 0
136
        mov     dword [eax+252], 0
126
        stdcall strncpy, eax, ebx, 255
137
        stdcall strncpy, eax, ebx, 255
127
@@:
138
@@:
128
        lea     eax, [filename]
139
        lea     eax, [filename]
129
        stdcall load_file, eax
140
        stdcall load_file, eax
-
 
141
 
130
        mov     esi, -ERROR_FILE_NOT_FOUND
142
        mov     esi, -ERROR_FILE_NOT_FOUND
131
        test    eax, eax
143
        test    eax, eax
132
        jz      .err_file
144
        jz      .err_file
Line 133... Line 145...
133
 
145
 
Line 173... Line 185...
173
        lea     esi, [eax+1]
185
        lea     esi, [eax+1]
174
        test    eax, eax
186
        test    eax, eax
175
        jnz     @F
187
        jnz     @F
176
        lea     esi, [filename]
188
        lea     esi, [filename]
177
@@:
189
@@:
178
        mov     ecx, 8; 8 chars for name
190
        mov     ecx, 11 ; 11 chars for name! 8 - is old value!
179
        mov     edi, [slot_base]
191
        mov     edi, [slot_base]
180
.copy_process_name_loop:
192
.copy_process_name_loop:
181
        lodsb
193
        lodsb
182
        cmp     al, '.'
194
        cmp     al, '.'
183
        jz      .copy_process_name_done
195
        jz      .copy_process_name_done
Line 235... Line 247...
235
        call    set_cr3
247
        call    set_cr3
Line 236... Line 248...
236
 
248
 
237
        xor     ebx, ebx
249
        xor     ebx, ebx
238
        mov     [application_table_status], ebx;unlock application_table_status mutex
250
        mov     [application_table_status], ebx;unlock application_table_status mutex
-
 
251
        mov     eax, [process_number];set result
239
        mov     eax, [process_number];set result
252
 
-
 
253
        jmp     .final
240
        ret
254
 
241
.failed:
255
.failed:
242
        mov     eax, [save_cr3]
256
        mov     eax, [save_cr3]
243
        call    set_cr3
257
        call    set_cr3
244
.err:
258
.err:
245
.err_hdr:
259
.err_hdr:
246
        stdcall kernel_free, [file_base]
260
        stdcall kernel_free, [file_base]
247
.err_file:
261
.err_file:
248
        xor     eax, eax
262
        xor     eax, eax
249
        mov     [application_table_status], eax
263
        mov     [application_table_status], eax
-
 
264
        mov     eax, esi
-
 
265
.final:
-
 
266
        cmp     [SCR_MODE], word 0x13
-
 
267
        jbe     @f
-
 
268
        pushad
-
 
269
        stdcall set_cursor, [handle]
-
 
270
        mov     [redrawmouse_unconditional], 1
-
 
271
        call    __sys_draw_pointer
-
 
272
        popad
250
        mov     eax, esi
273
@@:
251
        ret
274
        ret
Line 252... Line 275...
252
endp
275
endp
253
 
276