LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   how to make a keyboard function in a kernel work (http://www.linuxquestions.org/questions/programming-9/how-to-make-a-keyboard-function-in-a-kernel-work-759667/)

smeezekitty 10-04-2009 04:59 PM

how to make a keyboard function in a kernel work
 
ok, i have been writing this little protected mode kernel
and for some reason or another the keyboard function freezes the machine
what do you think is causing it?
Code:

[]
#define getch() (int)read_keyboard
unsigned char keyready(){
asm {
mov ah,1
int 16h
jz no_key
}
return 1;
no_key:
return 0;
}
unsigned char read_keyboard(){
asm {
xor ah,ah
int 0x16
}
return _AL;
}


smeezekitty 10-04-2009 09:17 PM

never mind i was corrupting the interrupt table


All times are GMT -5. The time now is 06:52 PM.