diff options
| -rw-r--r-- | README | 5 | ||||
| -rw-r--r-- | kernel/interrupts.c | 2 | ||||
| -rw-r--r-- | kernel/kernel.c | 3 | ||||
| -rw-r--r-- | kernel/keyboard.c | 10 | ||||
| -rw-r--r-- | kernel/shell.c | 7 |
5 files changed, 18 insertions, 9 deletions
@@ -114,3 +114,8 @@ apertium? clang freebsd user-mode-linux + +REFERENCES +========== + +http://www.brokenthorn.com/Resources/OSDev17.html diff --git a/kernel/interrupts.c b/kernel/interrupts.c index ce49201..49a29a3 100644 --- a/kernel/interrupts.c +++ b/kernel/interrupts.c @@ -45,7 +45,7 @@ void int_def_handler() int_unhandled++; - // todo also the other pic!// TODO + // send EOI to primary PIC __asm__("mov $0x20, %al"); __asm__("out %al, $0x20"); diff --git a/kernel/kernel.c b/kernel/kernel.c index a25ba83..94a5b9f 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -36,6 +36,7 @@ void kernel_main() timer_init(); scr_put_string_nl("Configured PIT Channel 0 : Mode 2 : 1/25 s."); + /* //probe memory scr_put_string_nl("Probing core memory..."); char *prober=0xf000; @@ -51,6 +52,8 @@ void kernel_main() scr_put_hex((uint32_t)prober>>16); scr_put_hex((uint32_t)prober&0xffff); scr_put_string_nl(" finished!"); + // + */ // init and interrupt decriptor table diff --git a/kernel/keyboard.c b/kernel/keyboard.c index d412c84..cdc557e 100644 --- a/kernel/keyboard.c +++ b/kernel/keyboard.c @@ -10,14 +10,6 @@ void keyboard_handle(uint8_t in) { -#ifdef DEBUG - // test interrupt 88 // whenver A is pressed - if(in==0x1e) - { - int_generate88(); - } -#endif - int i=0; // //print_hex(int_count); @@ -147,8 +139,10 @@ void int_kb_handler() keyboard_handle(kb_in); //TODO!! + // send EOI to primary PIC __asm__("mov $0x20, %al"); __asm__("out %al, $0x20"); + // __asm__("popa"); __asm__("leave"); diff --git a/kernel/shell.c b/kernel/shell.c index 4507931..ad8011b 100644 --- a/kernel/shell.c +++ b/kernel/shell.c @@ -73,6 +73,13 @@ void shell_execute() scr_put_string(" "); scr_put_hex(int_unhandled); } + else if(1==strcmp(command,"EIGHT")) + { + scr_put_string_nl(" generating software interrupt 88"); + scr_put_string(" "); + int_generate88(); + + } else { scr_put_string_nl(" unsupported command, sorry!"); |
