My good freind the Keyboard...

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
Yoshy

My good freind the Keyboard...

Post by Yoshy »

Hi, It's me again :D
Okay so I got I nice litte kernel, loads, prints a litle bit of information and then it waits for keyboard input. But thats is the problem, it WAITS for keyboard input! I don't want it to wait... I want to have a INT fired when the user pressed a key, but I don't know how :( I'm in pMode, wrtting in C and I don't know what to setup.

I tried looking at the Linux sources but the pc_keyb.c uses soo much other functions outside that I can't undersant a thing :(. So I request your help ;D

Thanks !
Tom

Re:My good freind the Keyboard...

Post by Tom »

can I see your IDT and bootsector code?
Curufir

Re:My good freind the Keyboard...

Post by Curufir »

You need to setup the PIC and handle IRQ 1 in your IDT, that's how you get the keyboard to interrupt your code.

Examples of the various bits you need already exist on this board in a few threads.

Curufir
Tom

Re:My good freind the Keyboard...

Post by Tom »

I wanted to see your IDT code to see if there's something wrong the mabe I could figure out.......
Yoshy

Re:My good freind the Keyboard...

Post by Yoshy »

Humm okay, I think I'll need to know: what is an 'IDT' ? I know what the PIC is but I don't know how to access it.

Oh and Tom, I'm using your bootsector -- Or I think it's yours... well anyways, not your kernel. (Bootsector is said to come from FritzOS 0.6 -- Oh wait! there's your name, Tom, in the copyright :D so I think it yours. ;) )

(Quote to self: Darn, I fell like a newbie :( )
Schol-R-LEA

Re:My good freind the Keyboard...

Post by Schol-R-LEA »

Yoshy wrote:Humm okay, I think I'll need to know: what is an 'IDT' ?
The Interrupt Descriptor Table is the the protected mode equivalent of the Interrupt Vector Table (IVT); it holds a list of the interrupt vectors, that is, the addresses of an interrupt handlers for each interrupt number. The SIGOPS Roll-Your-Own OS tutorial has a good page on the subject. A messageboard search on "Interrupt Descriptor Table" also brings up a fair amount of useful info.
(Quote to self: Darn, I fell like a newbie :( )
It's OK to feel like that when you are one, esp. since these are issues you'd almost never encounter except in OS design. You're actually doing better than most do starting out; it took me years to get where you are. Don't rush things, and it will come in time.
Post Reply