Writing keyboard driver & Porting scanf
Writing keyboard driver & Porting scanf
Hello I am trying to make a keyboard driver for my "os" to create something equivalent to scanf.But I can't even make user input a character. How can I write a keyboard driver? Thanks.(I checked others projects and tried to make their keyboard driver work on mine but its not working)
Re: Writing keyboard driver & Porting scanf
First: Get a working Interrupt Service Routine system going,
Second: Write an ISR handler in assembly,
Third: Write a GDT service,
Fourth: Write a VGA driver,
5th: Write a keyboard driver, that when the keyboard interrupt is fired from the proccesser, is set to get the pressed key, then print it to the screen.
Second: Write an ISR handler in assembly,
Third: Write a GDT service,
Fourth: Write a VGA driver,
5th: Write a keyboard driver, that when the keyboard interrupt is fired from the proccesser, is set to get the pressed key, then print it to the screen.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Writing keyboard driver & Porting scanf
Assuming that you have a functional print and timer interrupt already (because those are easier, and test important fundamental parts), can you get interrupts for individual keystrokes yet?
You can't even do 1 and 2 without a GDT.Third: Write a GDT service,
Re: Writing keyboard driver & Porting scanf
Try reading http://www.brokenthorn.com/Resources/OSDev19.html
That is, if you have all the other things that Combuster and the guy with the hard username listed (though a complete VGA driver doesn't seem necessary)
That is, if you have all the other things that Combuster and the guy with the hard username listed (though a complete VGA driver doesn't seem necessary)
Re: Writing keyboard driver & Porting scanf
Hehe oops Combuster, I must have gotten them out of order
Re: Writing keyboard driver & Porting scanf
One thing I tried first that might make things easier: For your first keyboard driver, just display the hex values of the scan codes. That's it. There's virtually no work to do; after you write it play around a bit, pressing and releasing various keys and ensuring you're getting the codes you'd expect. Obviously that's not a useful driver, but it is an easy way to get through the first baby step.