Keyboard I/O

If you are new to OS Development, plan on spending some time here first before going into the other forums.

Moderator:Moderators

Post Reply
deph
Posts:1
Joined:Mon Jul 14, 2008 9:41 am
Keyboard I/O

Post by deph » Mon Jul 14, 2008 9:46 am

Hello !
Does anyone have a tutorial / tips on how to read characters from the keyboard using in/out instructions on ports 0x60 and 0x64 ? (i.e. implement something like getchar() using in/out);
... Do I need more than these to actually read characters from the keyboard ?

Andyhhp
Moderator
Posts:387
Joined:Tue Oct 23, 2007 10:05 am
Location:127.0.0.1
Contact:

Post by Andyhhp » Wed Jul 16, 2008 6:55 pm

I believe it is possible to read keyboard data like that.

However, a better way would be to use interrupts. One of the hardware interrupts that you set up is labeled as 'keyboard' and, when the keyboard controller is set up correctly, you will receive an interrupt on every key press.

Sadly, I don't know anything about implementing this although mike can almost certainly help.

Andrew Cooper
Image

Post Reply