Subversion Repositories Kolibri OS

Rev

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

Rev 2385 Rev 2540
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
2
;;                                                              ;;
3
;; Copyright (C) KolibriOS team 2004-2007. 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: 2385 $
8
$Revision $
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
        pushad
-
 
88
        stdcall set_cursor, [def_cursor_clock]
-
 
89
        mov     [handle], eax
-
 
90
        mov     [redrawmouse_unconditional], 1
-
 
91
        call    __sys_draw_pointer
84
        pushad
92
        popad
Line 85... Line 93...
85
 
93
 
Line 86... Line 94...
86
        mov     [flags], edx
94
        mov     [flags], edx
Line 111... Line 119...
111
        jnz     @b
119
        jnz     @b
112
        jmp     .namecopied
120
        jmp     .namecopied
113
.bigfilename:
121
.bigfilename:
114
        popad
122
        popad
115
        mov     eax, -ERROR_FILE_NOT_FOUND
123
        mov     eax, -ERROR_FILE_NOT_FOUND
-
 
124
 
116
        ret
125
        jmp     .final
Line 117... Line 126...
117
 
126
 
Line 118... Line 127...
118
.namecopied:
127
.namecopied:
119
 
128
 
Line 125... Line 134...
125
        mov     dword [eax+252], 0
134
        mov     dword [eax+252], 0
126
        stdcall strncpy, eax, ebx, 255
135
        stdcall strncpy, eax, ebx, 255
127
@@:
136
@@:
128
        lea     eax, [filename]
137
        lea     eax, [filename]
129
        stdcall load_file, eax
138
        stdcall load_file, eax
-
 
139
 
130
        mov     esi, -ERROR_FILE_NOT_FOUND
140
        mov     esi, -ERROR_FILE_NOT_FOUND
131
        test    eax, eax
141
        test    eax, eax
132
        jz      .err_file
142
        jz      .err_file
Line 133... Line 143...
133
 
143
 
Line 235... Line 245...
235
        call    set_cr3
245
        call    set_cr3
Line 236... Line 246...
236
 
246
 
237
        xor     ebx, ebx
247
        xor     ebx, ebx
238
        mov     [application_table_status], ebx;unlock application_table_status mutex
248
        mov     [application_table_status], ebx;unlock application_table_status mutex
-
 
249
        mov     eax, [process_number];set result
239
        mov     eax, [process_number];set result
250
 
-
 
251
        jmp     .final
240
        ret
252
 
241
.failed:
253
.failed:
242
        mov     eax, [save_cr3]
254
        mov     eax, [save_cr3]
243
        call    set_cr3
255
        call    set_cr3
244
.err:
256
.err:
245
.err_hdr:
257
.err_hdr:
246
        stdcall kernel_free, [file_base]
258
        stdcall kernel_free, [file_base]
247
.err_file:
259
.err_file:
248
        xor     eax, eax
260
        xor     eax, eax
249
        mov     [application_table_status], eax
261
        mov     [application_table_status], eax
-
 
262
        mov     eax, esi
-
 
263
.final:
-
 
264
        pushad
-
 
265
        stdcall set_cursor, [handle]
-
 
266
        mov     [redrawmouse_unconditional], 1
-
 
267
        call    __sys_draw_pointer
250
        mov     eax, esi
268
        popad
251
        ret
269
        ret
Line 252... Line 270...
252
endp
270
endp
253
 
271