Subversion Repositories Kolibri OS

Rev

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

Rev 684 Rev 709
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
2
;;                                                              ;;
3
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2008. 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
;;                                                              ;;
7
;;  MenuetOS process management, protected ring3                ;;
7
;;  MenuetOS process management, protected ring3                ;;
8
;;                                                              ;;
8
;;                                                              ;;
9
;;  Distributed under GPL. See file COPYING for details.        ;;
9
;;  Distributed under GPL. See file COPYING for details.        ;;
10
;;  Copyright 2003 Ville Turjanmaa                              ;;
10
;;  Copyright 2003 Ville Turjanmaa                              ;;
11
;;                                                              ;;
11
;;                                                              ;;
12
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 13... Line 13...
13
 
13
 
Line 14... Line 14...
14
$Revision: 684 $
14
$Revision: 709 $
15
 
15
 
16
 
16
 
Line 98... Line 98...
98
      save_ring3_context
98
      save_ring3_context
99
      mov bl, num
99
      mov bl, num
100
      jmp exc_c
100
      jmp exc_c
101
}
101
}
Line 102... Line 102...
102
 
102
 
103
exc_wo_code 0, 1, 2, 3, 4, 5, 6, 9, 15, 18
103
exc_wo_code 0, 2, 3, 4, 5, 6, 9, 15, 18
Line 104... Line 104...
104
exc_w_code 8, 10, 11, 12, 13, 14, 17
104
exc_w_code 8, 10, 11, 12, 13, 14, 17
105
 
105
 
106
exc_c:
106
exc_c:
107
        mov   ax, app_data  ;èñêëþ÷åíèå
107
        mov   ax, app_data  ;èñêëþ÷åíèå
Line -... Line 108...
-
 
108
        mov   ds, ax        ;çàãðóçèì ïðàâèëüíûå çíà÷åíè
-
 
109
        mov   es, ax        ;â ðåãèñòðû
-
 
110
 
-
 
111
; redirect to V86 manager? (EFLAGS & 0x20000) != 0?
108
        mov   ds, ax        ;çàãðóçèì ïðàâèëüíûå çíà÷åíè
112
        test    byte [esp+20h+8+2], 2
109
        mov   es, ax        ;â ðåãèñòðû
113
        jnz     v86_exc_c
110
 
114
 
111
; test if debugging
115
; test if debugging
112
        cli
116
        cli
Line 243... Line 247...
243
p_irq14:
247
p_irq14:
244
        save_ring3_context
248
        save_ring3_context
245
        mov     ax, app_data  ;os_data
249
        mov     ax, app_data  ;os_data
246
        mov     ds, ax
250
        mov     ds, ax
247
        mov     es, ax
251
        mov     es, ax
-
 
252
        mov     byte [BOOT_VAR + 0x48E], 0xFF
248
        call    [irq14_func]
253
        call    [irq14_func]
249
        call    ready_for_next_irq_1
254
        call    ready_for_next_irq_1
250
        restore_ring3_context
255
        restore_ring3_context
251
        iret
256
        iret
252
p_irq15:
257
p_irq15:
253
        save_ring3_context
258
        save_ring3_context
254
        mov     ax, app_data  ;os_data
259
        mov     ax, app_data  ;os_data
255
        mov     ds, ax
260
        mov     ds, ax
256
        mov     es, ax
261
        mov     es, ax
-
 
262
        mov     byte [BOOT_VAR + 0x48E], 0xFF
257
        call    [irq15_func]
263
        call    [irq15_func]
258
        call    ready_for_next_irq_1
264
        call    ready_for_next_irq_1
259
        restore_ring3_context
265
        restore_ring3_context
260
        iret
266
        iret
Line 292... Line 298...
292
 
298
 
Line 293... Line 299...
293
     iret
299
     iret
-
 
300
 
-
 
301
 
Line 294... Line 302...
294
 
302
irqhandler:
Line 295... Line 303...
295
 
303
        cmp     [v86_irqhooks+edi*8], 0
296
irqhandler:
304
        jnz     v86_irq2
Line 441... Line 449...
441
           push   esi      ;save .slot
449
           push   esi      ;save .slot
Line 442... Line 450...
442
 
450
 
443
           shl esi, 8
451
           shl esi, 8
444
           cmp [SLOT_BASE+esi+APPDATA.dir_table], 0
452
           cmp [SLOT_BASE+esi+APPDATA.dir_table], 0
-
 
453
           jne @F
445
           jne @F
454
           pop    esi
-
 
455
           shl    esi, 5
446
           add esp, 4
456
           mov    [CURRENT_TASK+esi+TASKDATA.state], 9
447
           ret
457
           ret
448
@@:
458
@@:
449
           ;mov    esi,process_terminating
459
           ;mov    esi,process_terminating
450
           ;call   sys_msg_board_str
460
           ;call   sys_msg_board_str
Line 457... Line 467...
457
           call  change_task
467
           call  change_task
458
           jmp   @b
468
           jmp   @b
459
term9:
469
term9:
460
           call  set_application_table_status
470
           call  set_application_table_status
Line -... Line 471...
-
 
471
 
-
 
472
; if the process is in V86 mode...
-
 
473
        mov     eax, [.slot]
-
 
474
        shl     eax, 8
-
 
475
        mov     esi, [eax+SLOT_BASE+APPDATA.pl0_stack]
-
 
476
        add     esi, RING0_STACK_SIZE
-
 
477
        cmp     [eax+SLOT_BASE+APPDATA.saved_esp0], esi
-
 
478
        jz      .nov86
-
 
479
; ...it has page directory for V86 mode
-
 
480
        mov     esi, [eax+SLOT_BASE+APPDATA.saved_esp0]
-
 
481
        mov     ecx, [esi+4]
-
 
482
        mov     [eax+SLOT_BASE+APPDATA.dir_table], ecx
-
 
483
; ...and I/O permission map for V86 mode
-
 
484
        mov     ecx, [esi+12]
-
 
485
        mov     [eax+SLOT_BASE+APPDATA.io_map], ecx
-
 
486
        mov     ecx, [esi+8]
-
 
487
        mov     [eax+SLOT_BASE+APPDATA.io_map+4], ecx
-
 
488
.nov86:
461
 
489
 
462
           mov esi, [.slot]
490
           mov esi, [.slot]
463
           shl esi,8
491
           shl esi,8
464
           add esi, SLOT_BASE+APP_OBJ_OFFSET
492
           add esi, SLOT_BASE+APP_OBJ_OFFSET
465
@@:
493
@@: