Rev 1066 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1066 | Rev 2971 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2007. 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: 1066 $ |
8 | $Revision: 2971 $ |
9 | 9 | ||
10 | EFL_IF equ 0x0200 |
10 | EFL_IF equ 0x0200 |
11 | EFL_IOPL1 equ 0x1000 |
11 | EFL_IOPL1 equ 0x1000 |
Line 139... | Line 139... | ||
139 | lea edi, [filename] |
139 | lea edi, [filename] |
140 | lea ecx, [edi+1024] |
140 | lea ecx, [edi+1024] |
141 | @@: |
141 | @@: |
142 | cmp edi, ecx |
142 | cmp edi, ecx |
143 | jae .bigfilename |
143 | jae .bigfilename |
- | 144 | ||
144 | lodsb |
145 | lodsb |
145 | stosb |
146 | stosb |
146 | test al, al |
147 | test al, al |
147 | jnz @b |
148 | jnz @b |
Line 170... | Line 171... | ||
170 | call test_app_header |
171 | call test_app_header |
171 | mov ecx, -0x1F |
172 | mov ecx, -0x1F |
172 | test eax, eax |
173 | test eax, eax |
173 | jz .err_hdr |
174 | jz .err_hdr |
Line 174... | Line 175... | ||
174 | 175 | ||
Line 175... | Line 176... | ||
175 | DEBUGF 1,"%s",new_process_loading |
176 | ; DEBUGF 1,"%s",new_process_loading |
176 | 177 | ||
Line 177... | Line 178... | ||
177 | lea ebx, [application_table_status] |
178 | lea ebx, [application_table_status] |
Line 224... | Line 225... | ||
224 | mov [ebx+APPDATA.dir_table],eax |
225 | mov [ebx+APPDATA.dir_table],eax |
225 | mov ecx,[hdr_mem] |
226 | mov ecx,[hdr_mem] |
226 | mov [ebx+APPDATA.mem_size],ecx |
227 | mov [ebx+APPDATA.mem_size],ecx |
Line 227... | Line 228... | ||
227 | 228 | ||
228 | mov edi, [file_size] |
229 | mov edi, [file_size] |
229 | ; add edi, 4095 |
230 | add edi, 4095 |
230 | ; and edi, not 4095 |
231 | and edi, not 4095 |
231 | sub ecx, edi |
232 | sub ecx, edi |
Line 232... | Line 233... | ||
232 | jna @F |
233 | jna @F |
233 | 234 | ||
Line 259... | Line 260... | ||
259 | pop edi |
260 | pop edi |
260 | pop esi |
261 | pop esi |
261 | pop ebx |
262 | pop ebx |
262 | mov eax, -ERROR_FILE_NOT_FOUND |
263 | mov eax, -ERROR_FILE_NOT_FOUND |
263 | ret |
264 | ret |
- | 265 | ||
264 | .failed: |
266 | .failed: |
265 | mov eax, [save_cr3] |
267 | mov eax, [save_cr3] |
266 | call set_cr3 |
268 | call set_cr3 |
267 | .err: |
269 | .err: |
268 | .err_hdr: |
270 | .err_hdr: |
Line 277... | Line 279... | ||
277 | mov [application_table_status],eax |
279 | mov [application_table_status],eax |
278 | mov eax, ecx |
280 | mov eax, ecx |
279 | ret |
281 | ret |
280 | endp |
282 | endp |
Line -... | Line 283... | ||
- | 283 | ||
281 | 284 | ||
282 | align 4 |
285 | align 4 |
Line 283... | Line 286... | ||
283 | proc pe_app_param stdcall path:dword, raw:dword, ex_pg_dir:dword, ex_stack:dword |
286 | proc pe_app_param stdcall path:dword, raw:dword, ex_pg_dir:dword, ex_stack:dword |
284 | 287 | ||
Line 446... | Line 449... | ||
446 | _pe_restart: |
449 | _pe_restart: |
447 | add esp, 12 |
450 | add esp, 12 |
448 | popad |
451 | popad |
449 | iretd |
452 | iretd |
Line 450... | Line -... | ||
450 | - | ||
451 | 453 | ||
452 | align 4 |
454 | align 4 |
453 | proc get_new_process_place |
455 | proc get_new_process_place |
454 | ;input: |
456 | ;input: |
455 | ; none |
457 | ; none |
Line 672... | Line 674... | ||
672 | mov edi, [esp+12] |
674 | mov edi, [esp+12] |
Line 673... | Line 675... | ||
673 | 675 | ||
674 | add esp, 16 |
676 | add esp, 16 |
Line -... | Line 677... | ||
- | 677 | ret |
|
- | 678 | ||
675 | ret |
679 | |
676 | 680 | ||
677 | align 4 |
- | |
678 | set_cr3: |
681 | align 4 |
679 | 682 | set_cr3: |
|
680 | mov ebx, [current_slot] |
683 | mov ebx, [current_slot] |
681 | mov [ebx+APPDATA.dir_table], eax |
684 | mov [ebx+APPDATA.dir_table], eax |
Line 1043... | Line 1046... | ||
1043 | mov [app_cmdline], eax |
1046 | mov [app_cmdline], eax |
1044 | mov [app_path], eax |
1047 | mov [app_path], eax |
1045 | mov [app_eip], ebx |
1048 | mov [app_eip], ebx |
1046 | mov [app_esp], ecx |
1049 | mov [app_esp], ecx |
Line 1047... | Line -... | ||
1047 | - | ||
1048 | ;mov esi,new_process_loading |
- | |
1049 | ;call sys_msg_board_str |
1050 | |
- | 1051 | ;DEBUGF 1,"%s",new_process_loading |
|
1050 | DEBUGF 1,"%s",new_process_loading |
1052 | |
1051 | .wait_lock: |
1053 | .wait_lock: |
1052 | cmp [application_table_status],0 |
1054 | cmp [application_table_status],0 |
Line 1053... | Line 1055... | ||
1053 | je .get_lock |
1055 | je .get_lock |
Line 1099... | Line 1101... | ||
1099 | 1101 | ||
1100 | lea eax, [app_cmdline] |
1102 | lea eax, [app_cmdline] |
1101 | stdcall set_app_params ,[slot],eax,dword 0,\ |
1103 | stdcall set_app_params ,[slot],eax,dword 0,\ |
Line 1102... | Line -... | ||
1102 | dword 0,dword 0 |
- | |
1103 | - | ||
1104 | ;mov esi,new_process_running |
1104 | dword 0,dword 0 |
Line 1105... | Line 1105... | ||
1105 | ;call sys_msg_board_str ;output information about succefull startup |
1105 | |
1106 | DEBUGF 1,"%s",new_process_running |
1106 | ; DEBUGF 1,"%s",new_process_running |
1107 | 1107 | ||
1108 | mov [application_table_status],0 ;unlock application_table_status mutex |
1108 | mov [application_table_status],0 ;unlock application_table_status mutex |