Subversion Repositories Kolibri OS

Rev

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

Rev 750 Rev 769
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2008. 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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 750 $
8
$Revision: 769 $
9
 
9
 
Line 22... Line 22...
22
         cmp  ebx, 15           ; hidnplayr says: we only have 16 IRQ's
22
	 cmp  ebx, 15		; hidnplayr says: we only have 16 IRQ's
23
         ja   .err
23
	 ja   .err
24
         mov  eax, [handler]
24
	 mov  eax, [handler]
25
         test eax, eax
25
	 test eax, eax
26
         jz   .err
26
	 jz   .err
-
 
27
	 cmp  [irq_owner + 4 * ebx], 0
-
 
28
	 jne  .err
27
         mov  [irq_tab+ebx*4], eax
29
	 mov  [irq_tab+ebx*4], eax
-
 
30
 
-
 
31
	 ;push eax
-
 
32
	 ;mov  eax, [TASK_BASE]
-
 
33
	 ;mov  eax, [eax + TASKDATA.pid]
-
 
34
	 mov  [irq_owner + 4 * ebx], 1
-
 
35
	 ;pop  eax
-
 
36
 
28
         stdcall enable_irq, [irq]
37
	 stdcall enable_irq, [irq]
29
         ret
38
	 ret
30
.err:
39
.err:
31
         xor eax, eax
40
	 xor eax, eax
32
         ret
41
	 ret
Line 57... Line 66...
57
;; proc irq_serv
66
;; proc irq_serv
Line 58... Line 67...
58
 
67
 
Line 59... Line 68...
59
irq_serv:
68
irq_serv:
60
 
69
 
61
.irq_1:
-
 
62
	   push eax
70
.irq_1:
63
	   mov eax, 1
71
	   push 1
64
	   jmp .main
72
	   jmp .main
65
align 4
73
align 4
66
.irq_2:
-
 
67
	   push eax
74
.irq_2:
68
	   mov eax, 2
75
	   push 2
69
	   jmp .main
76
	   jmp .main
70
align 4
77
align 4
71
.irq_3:
-
 
72
	   push eax
78
.irq_3:
73
	   mov eax, 3
79
	   push 3
74
	   jmp .main
80
	   jmp .main
75
align 4
81
align 4
76
.irq_4:
-
 
77
	   push eax
82
.irq_4:
78
	   mov eax, 4
83
	   push 4
79
	   jmp .main
84
	   jmp .main
80
align 4
85
align 4
81
.irq_5:
-
 
82
	   push eax
86
.irq_5:
83
	   mov eax, 5
87
	   push 5
84
	   jmp .main
88
	   jmp .main
85
align 4
89
align 4
86
.irq_6:
-
 
87
	   push eax
90
.irq_6:
88
	   mov eax, 6
91
	   push 6
89
	   jmp .main
92
	   jmp .main
90
align 4
93
align 4
91
.irq_7:
-
 
92
	   push eax
94
.irq_7:
93
	   mov eax, 7
95
	   push 7
94
	   jmp .main
96
	   jmp .main
95
align 4
97
align 4
96
.irq_8:
-
 
97
	   push eax
98
.irq_8:
98
	   mov eax, 8
99
	   push 8
99
	   jmp .main
100
	   jmp .main
100
align 4
101
align 4
101
.irq_9:
-
 
102
	   push eax
102
.irq_9:
103
	   mov eax, 9
103
	   push 9
104
	   jmp .main
104
	   jmp .main
105
align 4
105
align 4
106
.irq_10:
-
 
107
	   push eax
106
.irq_10:
108
	   mov eax, 10
107
	   push 10
109
	   jmp .main
108
	   jmp .main
110
align 4
109
align 4
111
.irq_11:
-
 
112
	   push eax
110
.irq_11:
113
	   mov eax, 11
111
	   push 11
114
	   jmp .main
112
	   jmp .main
115
align 4
113
align 4
116
.irq_12:
-
 
117
	   push eax
114
.irq_12:
118
	   mov eax, 12
115
	   push 12
119
	   jmp .main
116
	   jmp .main
120
align 4
117
align 4
121
.irq_13:
-
 
122
	   push eax
118
.irq_13:
123
	   mov eax, 13
119
	   push 13
124
	   jmp .main
120
	   jmp .main
125
align 4
121
align 4
126
.irq_14:
-
 
127
	   push eax
122
.irq_14:
128
	   mov eax, 14
123
	   push 14
129
	   jmp .main
124
	   jmp .main
130
align 4
125
align 4
131
.irq_15:
-
 
132
	   push eax
126
.irq_15:
Line 133... Line 127...
133
	   mov eax, 15
127
	   push 15
134
	   jmp .main
128
	   jmp .main
135
 
129
 
-
 
130
align 16
136
align 16
131
.main:
137
.main:
132
	   save_ring3_context
138
	   save_ring3_context
133
	   mov	 eax, [esp + 32]
Line 139... Line 134...
139
	   mov	 bx, app_data  ;os_data
134
	   mov	 bx, app_data  ;os_data
Line 149... Line 144...
149
 
144
 
150
	   call ebx
145
	   call ebx
Line 151... Line 146...
151
	   mov	[check_idle_semaphore],5
146
	   mov	[check_idle_semaphore],5
152
 
-
 
Line 153... Line 147...
153
.exit:
147
 
154
	   restore_ring3_context
148
.exit:
155
 
149
 
156
	   cmp eax, 8
150
	   cmp dword [esp + 32], 8
157
	   mov al, 0x20
151
	   mov al, 0x20
158
	   jb @f
152
	   jb @f
Line -... Line 153...
-
 
153
	   out 0xa0, al
159
	   out 0xa0, al
154
@@:
-
 
155
	   out 0x20, al
160
@@:
156
 
Line 161... Line 157...
161
	   out 0x20, al
157
	   restore_ring3_context
162
 
158
	   add	 esp, 4