LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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

Tags used in this thread
Popular LQ Tags , , , , , , , , ,

Reply
 
Thread Tools
Old 10-04-2009, 04:59 PM   #1
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: washington U.S.
Distribution: Damn Small Linux, KateOs, M$ Ickdows Vista, My own OS
Posts: 1,233
Thanked: 59
how to make a keyboard function in a kernel work


[Log in to get rid of this advertisement]
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;
}
windows_vista smeezekitty is offline  
Tag This Post , , , , , , , , ,
Reply With Quote
Old 10-04-2009, 09:17 PM   #2
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: washington U.S.
Distribution: Damn Small Linux, KateOs, M$ Ickdows Vista, My own OS
Posts: 1,233
Thanked: 59

Original Poster
never mind i was corrupting the interrupt table
windows_vista smeezekitty is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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-04-2009 12:12 AM
[SOLVED] how to make a messy sprintf function work smeezekitty Programming 7 10-03-2009 12:49 PM
Help getting function keys on keyboard to work sulvereagle59 Linux - Laptop and Netbook 4 06-12-2007 09:07 AM
Any progs to make keyboard buttons work? Jmcatch742 Linux - Software 1 12-30-2004 03:15 PM
Microsoft keyboard function keys don't work psilos Linux - Hardware 0 10-19-2003 01:01 PM


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

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration