1
2
3
4
5
6
7
8
9
10
11
12
13
14 .globl _floppy_interrupt,_parallel_interrupt
15
16 _floppy_interrupt:
17 cld
18 pushl %eax
19 pushl %ecx
20 pushl %edx
21 push %ds
22 push %es
23 push %fs
24 movl $0x10,%eax
25 mov %ax,%ds
26 mov %ax,%es
27 movl $0x17,%eax
28 mov %ax,%fs
29 movb $0x20,%al
30 outb %al,$0x20 # EOI to interrupt controller #1
31 xorl %eax,%eax
32 xchgl _do_floppy,%eax
33 testl %eax,%eax
34 jne 1f
35 movl $_unexpected_floppy_interrupt,%eax
36 1: call *%eax # "interesting" way of handling intr.
37 pop %fs
38 pop %es
39 pop %ds
40 popl %edx
41 popl %ecx
42 popl %eax
43 iret
44
45 _parallel_interrupt:
46 cld
47 pushl %eax
48 movb $0x20,%al
49 outb %al,$0x20
50 popl %eax
51 iret