Rev 2129 | Rev 2288 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2129 | Rev 2157 | ||
---|---|---|---|
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: 2129 $ |
8 | $Revision: 2157 $ |
Line 9... | Line 9... | ||
9 | 9 | ||
Line 125... | Line 125... | ||
125 | mov dword [eax+252], 0 |
125 | mov dword [eax+252], 0 |
126 | stdcall strncpy, eax, ebx, 255 |
126 | stdcall strncpy, eax, ebx, 255 |
127 | @@: |
127 | @@: |
128 | lea eax, [filename] |
128 | lea eax, [filename] |
129 | stdcall load_file, eax |
129 | stdcall load_file, eax |
130 | mov ecx, -ERROR_FILE_NOT_FOUND |
130 | mov esi, -ERROR_FILE_NOT_FOUND |
131 | test eax, eax |
131 | test eax, eax |
132 | jz .err_file |
132 | jz .err_file |
Line 133... | Line 133... | ||
133 | 133 | ||
134 | mov [file_base], eax |
134 | mov [file_base], eax |
Line 135... | Line 135... | ||
135 | mov [file_size], ebx |
135 | mov [file_size], ebx |
136 | 136 | ||
137 | lea ebx, [hdr_cmdline] |
137 | lea ebx, [hdr_cmdline] |
138 | call test_app_header |
138 | call test_app_header |
139 | mov ecx, -0x1F |
139 | mov esi, -0x1F |
Line 140... | Line -... | ||
140 | test eax, eax |
- | |
141 | jz .err_hdr |
- | |
142 | - | ||
143 | ;mov esi, new_process_loading |
140 | test eax, eax |
144 | ;call sys_msg_board_str ; write message to message board |
141 | jz .err_hdr |
145 | 142 | ||
146 | .wait_lock: |
143 | .wait_lock: |
147 | cmp [application_table_status],0 |
144 | cmp [application_table_status],0 |
Line 157... | Line 154... | ||
157 | 154 | ||
Line 158... | Line 155... | ||
158 | call set_application_table_status |
155 | call set_application_table_status |
159 | 156 | ||
160 | call get_new_process_place |
157 | call get_new_process_place |
161 | test eax, eax |
158 | test eax, eax |
Line 162... | Line 159... | ||
162 | mov ecx, -0x20 ; too many processes |
159 | mov esi, -0x20 ; too many processes |
163 | jz .err |
160 | jz .err |
164 | 161 | ||
Line 192... | Line 189... | ||
192 | 189 | ||
193 | mov ebx, cr3 |
190 | mov ebx, cr3 |
Line 194... | Line 191... | ||
194 | mov [save_cr3], ebx |
191 | mov [save_cr3], ebx |
195 | 192 | ||
196 | stdcall create_app_space,[hdr_mem],[file_base],[file_size] |
193 | stdcall create_app_space,[hdr_mem],[file_base],[file_size] |
197 | mov ecx, -30 ; no memory |
194 | mov esi, -30 ; no memory |
Line 198... | Line 195... | ||
198 | test eax, eax |
195 | test eax, eax |
199 | jz .failed |
196 | jz .failed |
Line 248... | Line 245... | ||
248 | .err_hdr: |
245 | .err_hdr: |
249 | stdcall kernel_free,[file_base] |
246 | stdcall kernel_free,[file_base] |
250 | .err_file: |
247 | .err_file: |
251 | xor eax, eax |
248 | xor eax, eax |
252 | mov [application_table_status],eax |
249 | mov [application_table_status],eax |
253 | mov eax, ecx |
250 | mov eax, esi |
254 | ret |
251 | ret |
255 | endp |
252 | endp |
Line 256... | Line 253... | ||
256 | 253 | ||
257 | align 4 |
254 | align 4 |