LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-04-2009, 03:59 PM   #1
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
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;
}
 
Old 10-04-2009, 08:17 PM   #2
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
never mind i was corrupting the interrupt table
 
  


Reply

Tags
how, howto, interrupt, kernel, keyboard, linux, system, write



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
function to read keyboard from withen my kernel not working smeezekitty Programming 3 10-03-2009 11:12 PM
[SOLVED] how to make a messy sprintf function work smeezekitty Programming 7 10-03-2009 11:49 AM
Help getting function keys on keyboard to work sulvereagle59 Linux - Laptop and Netbook 4 06-12-2007 08:07 AM
Any progs to make keyboard buttons work? Jmcatch742 Linux - Software 1 12-30-2004 02:15 PM
Microsoft keyboard function keys don't work psilos Linux - Hardware 0 10-19-2003 12:01 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration