Subversion Repositories Kolibri OS

Rev

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

Rev 3240 Rev 3359
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 $
8
$Revision: 3359 $
Line 9... Line 9...
9
 
9
 
Line 305... Line 305...
305
        jmp     .final
305
        jmp     .final
Line 306... Line 306...
306
 
306
 
307
.failed:
307
.failed:
308
        mov     eax, [save_cr3]
308
        mov     eax, [save_cr3]
309
        call    set_cr3
-
 
310
 
309
        call    set_cr3
311
.err:
310
.err:
312
.err_hdr:
311
.err_hdr:
313
        stdcall kernel_free, [file_base]
312
        stdcall kernel_free, [file_base]
314
.err_file:
313
.err_file:
Line 1074... Line 1073...
1074
 
1073
 
1075
        shl     eax, 8
1074
        shl     eax, 8
1076
        mov     [eax+SLOT_BASE+APPDATA.fpu_state], edi
1075
        mov     [eax+SLOT_BASE+APPDATA.fpu_state], edi
1077
        mov     [eax+SLOT_BASE+APPDATA.exc_handler], 0
1076
        mov     [eax+SLOT_BASE+APPDATA.exc_handler], 0
-
 
1077
        mov     [eax+SLOT_BASE+APPDATA.except_mask], 0
Line 1078... Line 1078...
1078
        mov     [eax+SLOT_BASE+APPDATA.except_mask], 0
1078
        mov     [eax+SLOT_BASE+APPDATA.terminate_protection], 80000001h
1079
 
1079
 
1080
;set default io permission map
1080
;set default io permission map
1081
        mov     ecx, [SLOT_BASE+256+APPDATA.io_map]
1081
        mov     ecx, [SLOT_BASE+256+APPDATA.io_map]
Line 1198... Line 1198...
1198
        mov     [ebx+REG_EAX], eax
1198
        mov     [ebx+REG_EAX], eax
Line 1199... Line 1199...
1199
 
1199
 
1200
        mov     eax, [esi+0x08]  ;app_eip
1200
        mov     eax, [esi+0x08]  ;app_eip
1201
        mov     [ebx+REG_EIP], eax;app_entry
1201
        mov     [ebx+REG_EIP], eax;app_entry
-
 
1202
        mov     [ebx+REG_CS], dword app_code
-
 
1203
        mov     eax, [CURRENT_TASK]
-
 
1204
        shl     eax, 8                      ; created by kernel?
-
 
1205
        cmp     [SLOT_BASE+eax+APPDATA.dir_table], sys_pgdir - OS_BASE
-
 
1206
        jnz     @f
-
 
1207
        cmp     [app_path], 0               ; it is a thread?
-
 
1208
        jnz     @f
-
 
1209
        mov     [ebx+REG_CS], dword os_code ; kernel thread
1202
        mov     [ebx+REG_CS], dword app_code
1210
@@:
Line 1203... Line 1211...
1203
        mov     [ebx+REG_EFLAGS], dword EFL_IOPL1+EFL_IF
1211
        mov     [ebx+REG_EFLAGS], dword EFL_IOPL1+EFL_IF
1204
 
1212
 
1205
        mov     eax, [esi+0x0C]  ;app_esp
1213
        mov     eax, [esi+0x0C]  ;app_esp