Subversion Repositories Kolibri OS

Rev

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

Rev 433 Rev 436
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
3
;;                                                              ;;
-
 
4
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
-
 
5
;; Distributed under terms of the GNU General Public License    ;;
-
 
6
;;                                                              ;;
2
;;                                                               ;;
7
;;                                                              ;;
3
;;  MenuetOS process management, protected ring3                 ;;
8
;;  MenuetOS process management, protected ring3                ;;
4
;;                                                               ;;
9
;;                                                              ;;
5
;;  Distributed under GPL. See file COPYING for details.         ;;
10
;;  Distributed under GPL. See file COPYING for details.        ;;
6
;;  Copyright 2003 Ville Turjanmaa                               ;;
11
;;  Copyright 2003 Ville Turjanmaa                              ;;
7
;;                                                               ;;
12
;;                                                              ;;
8
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 9... Line 14...
9
 
14
 
10
align 4
15
align 4
11
idtreg:
16
idtreg:
12
     dw   8*0x41-1
17
     dw   8*0x41-1
Line 16... Line 21...
16
 
21
 
17
        mov    edi, idts+8
22
        mov    edi, idts+8
18
        mov    esi, sys_int
23
        mov    esi, sys_int
19
        mov    ecx, 0x40
24
        mov    ecx, 0x40
20
     @@:
25
     @@:
21
        mov    eax, [esi]
26
        lodsd
22
        mov    [edi],   ax           ; lower part of offset
27
        mov    [edi],   ax           ; lower part of offset
23
        mov    [edi+2], word os_code ; segment selector
-
 
24
        shr    eax, 16
28
        mov    [edi+2], word os_code ; segment selector
25
        mov    [edi+4], word 10001110b shl 8 ; interrupt descriptor
29
        mov     ax, word 10001110b shl 8        ; type: interrupt gate
26
        mov    [edi+6], ax
-
 
27
        add    esi, 4
30
        mov     [edi+4], eax
28
        add    edi, 8
-
 
29
        dec    ecx
31
        add    edi, 8
Line 30... Line 32...
30
        jnz    @b
32
        loop    @b
31
 
33
 
32
        ;mov    edi,8*0x40+idts+8
-
 
33
        mov    [edi + 0], word (i40 and ((1 shl 16)-1))
34
        ;mov    edi,8*0x40+idts+8
34
        mov    [edi + 2], word os_code
35
        mov     dword [edi], (i40 and 0xFFFF) or (os_code shl 16)
35
        mov    [edi + 4], word 11101110b*256
-
 
36
        mov    [edi + 6], word (i40 shr 16)
36
        mov     dword [edi+4], (11101111b shl 8) or (i40 and 0xFFFF0000)
Line 37... Line 37...
37
 
37
                                                ; type: trap gate
38
        ret
38
        ret
39
 
39