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