OSDev.org

The Place to Start for Operating System Developers
It is currently Sun Aug 20, 2017 10:40 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: How do I get key pressed without INT 16h?
PostPosted: Sun Aug 13, 2017 7:46 am 
Offline
Member
Member

Joined: Wed Aug 09, 2017 7:37 am
Posts: 81
Hello.

How do I get key pressed without INT 16h on a keyboard? Do I have to communicate with PS/2 and make a keyboard driver? Anyway, how do you communicate? Can you get input or do you have to read the scan codes?

Do I need to know if 0x1E (A) is pressed for example? Do I do something with the
Code:
in
or
Code:
out
instructions?
Yes, I've checked out the PS2_Keyboard page.

I might just experiment.

Any help would be appreciated.

Thanks
Steve.

@Geri I don't accept answers from you. Sorry.


Top
 Profile  
 
 Post subject: Re: How do I get key pressed without INT 16h?
PostPosted: Sun Aug 13, 2017 7:57 am 
Offline
Member
Member

Joined: Thu Aug 13, 2015 4:57 pm
Posts: 309
There's two ways you get keyboard input:
1) You do it yourself, which means you write drivers. This is the proper solution after boot is done, after which you should not rely on firmware (BIOS/UEFI).
2) Use a "library" to do it for you, BIOS or UEFI.

Since you said you don't want BIOS, then you have to do it yourself.

Check the wiki for PS/2 controller and PS/2 keyboard. They are two different things, so you should make two separate drivers, one for controller and one for keyboard.

A keyboard doesn't really have an "a" key or a "b" (etc) key, it just has keys. In different countries those keys have different labels printed on them. In Windows for example you can easily switch the keyboard layout that Windows uses. So you get the key presses from the keyboard and you map them to what ever you want, for instance "char"'s, but remember that not all keys are printable characters, for instance backspace.

There are also USB keyboards, most (all?) MoBo's support translating USB keyboard into a PS/2, so you don't have to deal with USB. USB is significantly more complex and takes a lot more effort. PS/2 I think is pretty simple, read the wiki and the specs.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Sik and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group