Subversion Repositories Kolibri OS

Rev

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

Rev 839 Rev 854
Line 9... Line 9...
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
 
14
$Revision: 839 $
-
 
Line 15... Line 14...
15
 
14
$Revision: 854 $
16
 
15
 
17
align 4
16
align 4
18
idtreg:
17
_init_idt:
-
 
18
           push edi
-
 
19
           push esi
Line 19... Line -...
19
     dw   8*0x41-1
-
 
20
     dd   idts+8
-
 
21
 
-
 
22
build_interrupt_table:
20
           mov edi, idts
23
 
21
           mov dword [idtreg+2], edi
24
	mov    edi, idts+8
22
 
25
	mov    esi, sys_int
23
           mov esi, sys_int
26
	mov    ecx, 0x40
24
           mov ecx, 0x40
Line 31... Line 29...
31
	mov	ax, word 10001110b shl 8	; type: interrupt gate
29
           mov ax, word 10001110b shl 8   ; type: interrupt gate
32
	mov	[edi+4], eax
30
           mov [edi+4], eax
33
	add    edi, 8
31
           add edi, 8
34
	loop	@b
32
           loop @b
Line -... Line 33...
-
 
33
 
-
 
34
           mov eax, i40
35
 
35
           mov ecx, i40
-
 
36
           and eax, 0x0000FFFF
36
	;mov    edi,8*0x40+idts+8
37
           and ecx, 0xFFFF0000
37
	mov	dword [edi], (i40 and 0xFFFF) or (os_code shl 16)
38
           or eax, os_code shl 16
-
 
39
           or ecx, (11101111b shl 8)
-
 
40
           mov [edi], eax
-
 
41
           mov [edi+4], ecx
-
 
42
 
38
	mov	dword [edi+4], (11101111b shl 8) or (i40 and 0xFFFF0000)
43
           lidt [idtreg]
-
 
44
           pop esi
39
						; type: trap gate
45
           pop edi
Line -... Line 46...
-
 
46
           ret
-
 
47
 
40
	ret
48
 
Line 41... Line 49...
41
 
49
 
42
iglobal
50
iglobal
Line -... Line 51...
-
 
51
 
-
 
52
  msg_sel_ker	db "kernel", 0
43
 
53
  msg_sel_app	db "application", 0
44
  msg_sel_ker	db "kernel", 0
54
 
45
  msg_sel_app	db "application", 0
55
align 4
46
 
56
 
47
  sys_int:
57
  sys_int:
Line 64... Line 74...
64
    dd	 irq_serv.irq_11, irq_serv.irq_12,irqD ,p_irq14,p_irq15
74
    dd	 irq_serv.irq_11, irq_serv.irq_12,irqD ,p_irq14,p_irq15
Line 65... Line 75...
65
 
75
 
Line 66... Line 76...
66
    times 16 dd unknown_interrupt
76
    times 16 dd unknown_interrupt
-
 
77
 
-
 
78
    dd	 i40
-
 
79
 
-
 
80
idtreg:
-
 
81
     dw   8*0x41-1
67
 
82
     dd   idts
Line 68... Line 83...
68
    dd	 i40
83
 
69
endg
84
endg
70
 
85