OS Dev Series: Tutorial 19

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Post Reply
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

OS Dev Series: Tutorial 19

Post by neon »

Hey everyone,

OS Dev Series Tutorial 19 is now official. It can be reached here:

Tutorial 19: Keyboard Programming

It covers:
  • Keyboard - Back in Time and Keyboard Layout
  • Inside the keyboard
  • Keyboard Protocols
  • Keyboard Encoder
  • Keyboard Controller
  • Scan Code Sets
  • Keyboard IRQ
To spice things up a little, the tutorials demo creates a (very!) basic command line interface (CLI). Because of this, it is also the first interactive demo.

Please let me know what you think of it, possible factual errors, etc. Any and all comments welcome. :D

Now lets all get back to our OS...
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Re: OS Dev Series: Tutorial 19

Post by frank »

All of your tutorials are very good. Lots of information, lots of code, lots of nice pictures. My only complaint is that there are no links in between tutorials, a Next and Previous link would be nice.
User avatar
Firestryke31
Member
Member
Posts: 550
Joined: Sat Nov 29, 2008 1:07 pm
Location: Throw a dart at central Texas
Contact:

Re: OS Dev Series: Tutorial 19

Post by Firestryke31 »

One thing I've noticed in the two tutorials I've glanced through are several common spelling mistakes. I don't have time to point them out right now, but later I can proofread them and see what I come across...
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Re: OS Dev Series: Tutorial 19

Post by Dex »

Looks like a nice tut, i wish there was stuff like this when i started, good work.
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: OS Dev Series: Tutorial 19

Post by Troy Martin »

berkus wrote:Whoah! Did you test your own code?
Judging by a working screenshot, I'd say the answer is "yes."
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: OS Dev Series: Tutorial 19

Post by neon »

berkus wrote:Whoah! Did you test your own code?
Yep :) LEDs worked fine for me when I tested it :)

I thank everyone for their comments so far :D
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: OS Dev Series: Tutorial 19

Post by Troy Martin »

berkus wrote:
Troy Martin wrote:
berkus wrote:Whoah! Did you test your own code?
Judging by a working screenshot, I'd say the answer is "yes."
I don't see the LEDs in the screenshot. Do you?
*hic8 heheh, yupppppp, ah shee them LEDsh! c'mere, kitteh kitteh kitteh... *hic* *thud!*
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: OS Dev Series: Tutorial 19

Post by 01000101 »

excellent job!
There's a ton of in-depth info there.
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

Re: OS Dev Series: Tutorial 19

Post by DeletedAccount »

Hi,
Good work .

Regards
Shrek
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: OS Dev Series: Tutorial 19

Post by jal »

Firestryke31 wrote:One thing I've noticed in the two tutorials I've glanced through are several common spelling mistakes.
I agree it's rather annoying. A simple spelling checker could help. Just copy/paste in Word (yes, I know it'll flag all the technical terms, but it will also flag the non-technical ones).


JAL
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: OS Dev Series: Tutorial 19

Post by jal »

The page on scancodes is a bit confusing. It has a header saying "Original XT Scan Code Set", but below it it lists extended keys (starting with 0xe0), ACPI and Windows keys, which were of course not present on an XT.

EDIT: It is also not mentioned clearly that a keyboard can use different scancode sets, and that it is possible to set them. I also do not agree with "modern keyboards" using untranslated scan code set 2 instead of translated set 2. See here for a more thorough explanation.


JAL
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: OS Dev Series: Tutorial 19

Post by neon »

The page on scancodes is a bit confusing. It has a header saying "Original XT Scan Code Set", but below it it lists extended keys (starting with 0xe0), ACPI and Windows keys, which were of course not present on an XT.
Hm, good point. I will have to change that.
EDIT: It is also not mentioned clearly that a keyboard can use different scancode sets, and that it is possible to set them. I also do not agree with "modern keyboards" using untranslated scan code set 2 instead of translated set 2.
Actually it does describe that a keyboard can use different scan code sets, and how to set them. I will take a look at the link when I get back from work.

Regarding the spelling errors - please do not notify me of the errors. All spelling errors are planned to be fixed in the next series revision. I have been notified of it alot of times and is on my to do list :)
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Post Reply