We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5aff719 commit 930cc09Copy full SHA for 930cc09
control.c
@@ -10,25 +10,29 @@
10
11
#include "globals.h"
12
13
-void interrupt (*old_keyboard)();
+void interrupt (*old_keyboard)(void);
14
15
void interrupt my_keyboard(void)
16
{
17
- int key = inportb(0x60);
+ int key;
18
+
19
+ key = inportb(0x60);
20
outportb(0x20, 0x20);
- if (key & 0x80)
21
22
+ if (key & 0x80) {
23
keytab[key - 0x80] = 0;
- else
24
+ }
25
+ else {
26
keytab[key] = 1;
27
28
}
29
30
void init_keyboard(void)
31
- int x;
32
old_keyboard = getvect(9);
33
setvect(9, my_keyboard);
- for (x = 0; x < 256; x++)
- keytab[x] = 0;
34
35
+ memset(keytab, 0, 256);
36
37
38
void restore_keyboard(void)
0 commit comments