Page 1 of 1

Can someone help me!

Posted: Fri Jul 12, 2013 2:28 am
by thegreatstudio
Hello guys!! I am working to my os. And i want to to know the keyboard support for my OS and how to add some commands when i have a keyboard support. Please help me :/

Re: Can someone help me!

Posted: Fri Jul 12, 2013 2:58 am
by thegreatstudio
Here is my OS source code (attached).. But I need your help on keyboard support and how can I add some commands.

Re: Can someone help me!

Posted: Fri Jul 12, 2013 3:28 am
by Nessphoro

Re: Can someone help me!

Posted: Fri Jul 12, 2013 3:00 pm
by Casm
Do you know how to write a hardware interrupt handler? If not, you had better learn about that first.

After that you can try reading scan codes from port 60h from inside your handler, and read up on the PS/2 keyboard on the Wiki.

You get commands the same way you would if you were writing an app in C. By calling something equivalent to getch() (which you will have to write yourself), and by storing the characters you receive in a buffer.

However, before you can process commands, you will need some kind of command interpretor. That could either be your operating system's shell program, some way down the road, or a kernel debugger, rather sooner.