summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-07-08 19:19:31 +0200
committerMichal Idziorek <m.i@gmx.at>2014-07-08 19:19:31 +0200
commit9c928f4962e4c4f9a03104bb0d6bac82f2cfa628 (patch)
treeeb97c229393d2243ccd899a3a68ea8cb53f2d57e /kernel
parentab398b66081a5595776ac9121aaae07a3c2fe455 (diff)
added and successfuly tested software interrupt
int 88 is issued by the kb driver whenever A is pressed and the the int_test_handler is run.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/interrupts.c4
-rw-r--r--kernel/kernel.c8
-rw-r--r--kernel/keyboard.c4
3 files changed, 12 insertions, 4 deletions
diff --git a/kernel/interrupts.c b/kernel/interrupts.c
index 7b44482..0676732 100644
--- a/kernel/interrupts.c
+++ b/kernel/interrupts.c
@@ -102,7 +102,9 @@ void int_show()
int offset;
for(offset=32;offset<40;offset++)
{
- print_hex(offset-32); //irq
+ print_hex(offset-32); //ir // install keyboard handler
+ int_install_ir(33, 0b10001110, 0x08,&int_kb_handler);
+q
print_string(" -> ");
print_hex(*(ptr3+offset*4)); //addrLo
print_hex(*(ptr3+1+offset*4)); //sel
diff --git a/kernel/kernel.c b/kernel/kernel.c
index 9bc3d64..989eab6 100644
--- a/kernel/kernel.c
+++ b/kernel/kernel.c
@@ -14,7 +14,7 @@ void int_test_handler()
{
__asm__("pusha");
- scr_put_string_nl("inside software interrupt handler 8");
+ scr_put_string_nl("inside software interrupt handler 88");
__asm__("popa");
@@ -36,13 +36,15 @@ void kernel_main()
// install and enable!
int_init(0x08);
int_install();
- int_enable();
// install keyboard handler
int_install_ir(33, 0b10001110, 0x08,&int_kb_handler);
// install test handler
-// int_install_ir(33, 0b10001110, 0x08,&int_kb_handler);
+ int_install_ir(88, 0b10001110, 0x08,&int_test_handler);
+
+ // now we can enable interrupts back again
+ int_enable();
scr_put_string_nl("Interrupts are up and running");
diff --git a/kernel/keyboard.c b/kernel/keyboard.c
index d1175c1..5d5e71f 100644
--- a/kernel/keyboard.c
+++ b/kernel/keyboard.c
@@ -10,6 +10,10 @@ static char last_code=0;
void int0(uint8_t in)
{
+
+ if(in==0x1e)__asm__("int $88"); // test interrupt 88
+ // whenver A is pressed
+
int i=0;
//
//print_hex(int_count);