Changed irq handler from C to assembler
[reactos.git] / reactos / ntoskrnl / ke / i386 / irqhand.s
1
2 #include <internal/i386/segment.h>
3
4 .global _irq_handler_0
5 _irq_handler_0:
6 pusha
7 pushl %ds
8 pushl %es
9 pushl %fs
10 movl $0xceafbeef,%eax
11 pushl %eax
12 movw $KERNEL_DS,%ax
13 movw %ax,%ds
14 movw %ax,%es
15 inb $0x21,%al
16 orb $1<<0,%al
17 outb %al,$0x21
18 pushl %esp
19 pushl $0
20 call _KiInterruptDispatch
21 popl %eax
22 popl %eax
23 popl %eax
24 popl %fs
25 popl %es
26 popl %ds
27 popa
28 iret
29
30 .global _irq_handler_1
31 _irq_handler_1:
32 pusha
33 pushl %ds
34 pushl %es
35 pushl %fs
36 movl $0xceafbeef,%eax
37 pushl %eax
38 movw $KERNEL_DS,%ax
39 movw %ax,%ds
40 movw %ax,%es
41 inb $0x21,%al
42 orb $1<<1,%al
43 outb %al,$0x21
44 pushl %esp
45 pushl $1
46 call _KiInterruptDispatch
47 popl %eax
48 popl %eax
49 popl %eax
50 popl %fs
51 popl %es
52 popl %ds
53 popa
54 iret
55
56 .global _irq_handler_2
57 _irq_handler_2:
58 pusha
59 pushl %ds
60 pushl %es
61 pushl %fs
62 movl $0xceafbeef,%eax
63 pushl %eax
64 movw $KERNEL_DS,%ax
65 movw %ax,%ds
66 movw %ax,%es
67 inb $0x21,%al
68 orb $1<<2,%al
69 outb %al,$0x21
70 pushl %esp
71 pushl $2
72 call _KiInterruptDispatch
73 popl %eax
74 popl %eax
75 popl %eax
76 popl %fs
77 popl %es
78 popl %ds
79 popa
80 iret
81
82 .global _irq_handler_3
83 _irq_handler_3:
84 pusha
85 pushl %ds
86 pushl %es
87 pushl %fs
88 movl $0xceafbeef,%eax
89 pushl %eax
90 movw $KERNEL_DS,%ax
91 movw %ax,%ds
92 movw %ax,%es
93 inb $0x21,%al
94 orb $1<<3,%al
95 outb %al,$0x21
96 pushl %esp
97 pushl $3
98 call _KiInterruptDispatch
99 popl %eax
100 popl %eax
101 popl %eax
102 popl %fs
103 popl %es
104 popl %ds
105 popa
106 iret
107
108 .global _irq_handler_4
109 _irq_handler_4:
110 pusha
111 pushl %ds
112 pushl %es
113 pushl %fs
114 movl $0xceafbeef,%eax
115 pushl %eax
116 movw $KERNEL_DS,%ax
117 movw %ax,%ds
118 movw %ax,%es
119 inb $0x21,%al
120 orb $1<<4,%al
121 outb %al,$0x21
122 pushl %esp
123 pushl $4
124 call _KiInterruptDispatch
125 popl %eax
126 popl %eax
127 popl %eax
128 popl %fs
129 popl %es
130 popl %ds
131 popa
132 iret
133
134 .global _irq_handler_5
135 _irq_handler_5:
136 pusha
137 pushl %ds
138 pushl %es
139 pushl %fs
140 movl $0xceafbeef,%eax
141 pushl %eax
142 movw $KERNEL_DS,%ax
143 movw %ax,%ds
144 movw %ax,%es
145 inb $0x21,%al
146 orb $1<<5,%al
147 outb %al,$0x21
148 pushl %esp
149 pushl $5
150 call _KiInterruptDispatch
151 popl %eax
152 popl %eax
153 popl %eax
154 popl %fs
155 popl %es
156 popl %ds
157 popa
158 iret
159
160 .global _irq_handler_6
161 _irq_handler_6:
162 pusha
163 pushl %ds
164 pushl %es
165 pushl %fs
166 movl $0xceafbeef,%eax
167 pushl %eax
168 movw $KERNEL_DS,%ax
169 movw %ax,%ds
170 movw %ax,%es
171 inb $0x21,%al
172 orb $1<<6,%al
173 outb %al,$0x21
174 pushl %esp
175 pushl $6
176 call _KiInterruptDispatch
177 popl %eax
178 popl %eax
179 popl %eax
180 popl %fs
181 popl %es
182 popl %ds
183 popa
184 iret
185
186 .global _irq_handler_7
187 _irq_handler_7:
188 pusha
189 pushl %ds
190 pushl %es
191 pushl %fs
192 movl $0xceafbeef,%eax
193 pushl %eax
194 movw $KERNEL_DS,%ax
195 movw %ax,%ds
196 movw %ax,%es
197 inb $0x21,%al
198 orb $1<<7,%al
199 outb %al,$0x21
200 pushl %esp
201 pushl $7
202 call _KiInterruptDispatch
203 popl %eax
204 popl %eax
205 popl %eax
206 popl %fs
207 popl %es
208 popl %ds
209 popa
210 iret
211
212 .global _irq_handler_8
213 _irq_handler_8:
214 pusha
215 pushl %ds
216 pushl %es
217 pushl %fs
218 movl $0xceafbeef,%eax
219 pushl %eax
220 movw $KERNEL_DS,%ax
221 movw %ax,%ds
222 movw %ax,%es
223 inb $0xa1,%al
224 orb $1<<(8-8),%al
225 outb %al,$0xa1
226 pushl %esp
227 pushl $8
228 call _KiInterruptDispatch
229 popl %eax
230 popl %eax
231 popl %eax
232 popl %fs
233 popl %es
234 popl %ds
235 popa
236 iret
237
238 .global _irq_handler_9
239 _irq_handler_9:
240 pusha
241 pushl %ds
242 pushl %es
243 pushl %fs
244 movl $0xceafbeef,%eax
245 pushl %eax
246 movw $KERNEL_DS,%ax
247 movw %ax,%ds
248 movw %ax,%es
249 inb $0xa1,%al
250 orb $1<<(9-8),%al
251 outb %al,$0xa1
252 pushl %esp
253 pushl $9
254 call _KiInterruptDispatch
255 popl %eax
256 popl %eax
257 popl %eax
258 popl %fs
259 popl %es
260 popl %ds
261 popa
262 iret
263
264 .global _irq_handler_10
265 _irq_handler_10:
266 pusha
267 pushl %ds
268 pushl %es
269 pushl %fs
270 movl $0xceafbeef,%eax
271 pushl %eax
272 movw $KERNEL_DS,%ax
273 movw %ax,%ds
274 movw %ax,%es
275 inb $0xa1,%al
276 orb $1<<(10-8),%al
277 outb %al,$0xa1
278 pushl %esp
279 pushl $10
280 call _KiInterruptDispatch
281 popl %eax
282 popl %eax
283 popl %eax
284 popl %fs
285 popl %es
286 popl %ds
287 popa
288 iret
289
290 .global _irq_handler_11
291 _irq_handler_11:
292 pusha
293 pushl %ds
294 pushl %es
295 pushl %fs
296 movl $0xceafbeef,%eax
297 pushl %eax
298 movw $KERNEL_DS,%ax
299 movw %ax,%ds
300 movw %ax,%es
301 inb $0xa1,%al
302 orb $1<<(11-8),%al
303 outb %al,$0xa1
304 pushl %esp
305 pushl $11
306 call _KiInterruptDispatch
307 popl %eax
308 popl %eax
309 popl %eax
310 popl %fs
311 popl %es
312 popl %ds
313 popa
314 iret
315
316 .global _irq_handler_12
317 _irq_handler_12:
318 pusha
319 pushl %ds
320 pushl %es
321 pushl %fs
322 movl $0xceafbeef,%eax
323 pushl %eax
324 movw $KERNEL_DS,%ax
325 movw %ax,%ds
326 movw %ax,%es
327 inb $0xa1,%al
328 orb $1<<(12-8),%al
329 outb %al,$0xa1
330 pushl %esp
331 pushl $12
332 call _KiInterruptDispatch
333 popl %eax
334 popl %eax
335 popl %eax
336 popl %fs
337 popl %es
338 popl %ds
339 popa
340 iret
341
342 .global _irq_handler_13
343 _irq_handler_13:
344 pusha
345 pushl %ds
346 pushl %es
347 pushl %fs
348 movl $0xceafbeef,%eax
349 pushl %eax
350 movw $KERNEL_DS,%ax
351 movw %ax,%ds
352 movw %ax,%es
353 inb $0xa1,%al
354 orb $1<<(13-8),%al
355 outb %al,$0xa1
356 pushl %esp
357 pushl $13
358 call _KiInterruptDispatch
359 popl %eax
360 popl %eax
361 popl %eax
362 popl %fs
363 popl %es
364 popl %ds
365 popa
366 iret
367
368 .global _irq_handler_14
369 _irq_handler_14:
370 pusha
371 pushl %ds
372 pushl %es
373 pushl %fs
374 movl $0xceafbeef,%eax
375 pushl %eax
376 movw $KERNEL_DS,%ax
377 movw %ax,%ds
378 movw %ax,%es
379 inb $0xa1,%al
380 orb $1<<(14-8),%al
381 outb %al,$0xa1
382 pushl %esp
383 pushl $14
384 call _KiInterruptDispatch
385 popl %eax
386 popl %eax
387 popl %eax
388 popl %fs
389 popl %es
390 popl %ds
391 popa
392 iret
393
394 .global _irq_handler_15
395 _irq_handler_15:
396 pusha
397 pushl %ds
398 pushl %es
399 pushl %fs
400 movl $0xceafbeef,%eax
401 pushl %eax
402 movw $KERNEL_DS,%ax
403 movw %ax,%ds
404 movw %ax,%es
405 inb $0xa1,%al
406 orb $1<<(15-8),%al
407 outb %al,$0xa1
408 pushl %esp
409 pushl $15
410 call _KiInterruptDispatch
411 popl %eax
412 popl %eax
413 popl %eax
414 popl %fs
415 popl %es
416 popl %ds
417 popa
418 iret
419
420