Do I HAVE to use interrupts for keyboard input?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
d2alphame
Member
Member
Posts: 35
Joined: Fri May 04, 2012 8:04 am

Do I HAVE to use interrupts for keyboard input?

Post by d2alphame »

Don't know where exactly this question should go so i decided on a new topic under "OS Development"
HELP! Do I HAVE to use interrupts (GDT, IDT stuffs) in order to read keyboard input in 64 bits mode? If I don't HAVE to, then what work-arounds are available?
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: Do I HAVE to use interrupts for keyboard input?

Post by bluemoon »

While it's possible to poll the IO port for PS/2 keyboard input (not work for USB), I can't imagine doing 64bit kernel without a working IDT, you will make yourself crazy debugging exceptions. And I'm sure you need a GDT to switch from compatibility mode to long mode.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Do I HAVE to use interrupts for keyboard input?

Post by Solar »

You don't want to poll the keyboard. Actually, you don't want to poll anything. That's why interrupts were invented.

What is your reason for wanting to avoid interrupts? If you think they're too difficult for you, be notified that few things in OS development are much simpler.
Every good solution is obvious once you've found it.
User avatar
turdus
Member
Member
Posts: 496
Joined: Tue Feb 08, 2011 1:58 pm

Re: Do I HAVE to use interrupts for keyboard input?

Post by turdus »

No, you don't HAVE to.
You should spend more time with learning before you start OS development.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Do I HAVE to use interrupts for keyboard input?

Post by Love4Boobies »

If your problem is truly that you don't understand interrupts, why don't you ask for clarifications instead of asking how to avoid them? If your problem is with descriptor tables, then ask about that. Either way, don't pick to easy way just because you're too lazy to get informed.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
d2alphame
Member
Member
Posts: 35
Joined: Fri May 04, 2012 8:04 am

Re: Do I HAVE to use interrupts for keyboard input?

Post by d2alphame »

Love4Boobies wrote:If your problem is truly that you don't understand interrupts, why don't you ask for clarifications instead of asking how to avoid them? If your problem is with descriptor tables, then ask about that. Either way, don't pick to easy way just because you're too lazy to get informed.
siiiiggghh ok, so u caught me (*grinning ear to ear*) - and I do understand interrupts... but those little monsters they call descriptor tables...? sheeesh
Alright next topic, Descriptor Tables it shall be!!!
Post Reply