Hello,
I need to find a keyboard driver for my OS. Does anyone
know where I could find some source code?
Collin
Keyboard Driver
RE:Keyboard Driver
>On 2001-02-23 12:58:09, Collin wrote:
>Hello,
>I need to find a keyboard driver for my OS. Does anyone
>know where I could find some source code?
>
>Collin
It`s quite simple, after the IRQ occurs you have to get a
scancode from port 60h and then send to port 20h value 20h
to tell the controler that the IRQ was dispatched.
so the code could look like:
mov dx,60h
in dx,al
mov bl,al
mov al,20h
mov dx,20h
out dx,al
;; bl -> scancode
another story comes when you want to change scancode to a
ascii character:) anyone have any table about it ?
>Hello,
>I need to find a keyboard driver for my OS. Does anyone
>know where I could find some source code?
>
>Collin
It`s quite simple, after the IRQ occurs you have to get a
scancode from port 60h and then send to port 20h value 20h
to tell the controler that the IRQ was dispatched.
so the code could look like:
mov dx,60h
in dx,al
mov bl,al
mov al,20h
mov dx,20h
out dx,al
;; bl -> scancode
another story comes when you want to change scancode to a
ascii character:) anyone have any table about it ?
RE:Keyboard Driver
>On 2001-02-23 13:22:44, Crg^ wrote:
>>On 2001-02-23 12:58:09, Collin wrote:
>>Hello,
>>I need to find a keyboard driver for my OS. Does
anyone
>>know where I could find some source code?
>>
>>Collin
>It`s quite simple, after the IRQ occurs you have to get
a
>scancode from port 60h and then send to port 20h value
20h
>to tell the controler that the IRQ was dispatched.
>so the code could look like:
>
>mov dx,60h
>in dx,al
>mov bl,al
>mov al,20h
>mov dx,20h
>out dx,al
>;; bl -> scancode
>
>another story comes when you want to change scancode to
a
>ascii character:) anyone have any table about it ?
Thanks. This will help alot.
Collin
>>On 2001-02-23 12:58:09, Collin wrote:
>>Hello,
>>I need to find a keyboard driver for my OS. Does
anyone
>>know where I could find some source code?
>>
>>Collin
>It`s quite simple, after the IRQ occurs you have to get
a
>scancode from port 60h and then send to port 20h value
20h
>to tell the controler that the IRQ was dispatched.
>so the code could look like:
>
>mov dx,60h
>in dx,al
>mov bl,al
>mov al,20h
>mov dx,20h
>out dx,al
>;; bl -> scancode
>
>another story comes when you want to change scancode to
a
>ascii character:) anyone have any table about it ?
Thanks. This will help alot.
Collin
RE:Keyboard Driver
>On 2001-02-23 13:22:44, Crg^ wrote:
>>On 2001-02-23 12:58:09, Collin wrote:
>>Hello,
>>I need to find a keyboard driver for my OS. Does
anyone
>>know where I could find some source code?
>>
>>Collin
>It`s quite simple, after the IRQ occurs you have to get
a
>scancode from port 60h and then send to port 20h value
20h
>to tell the controler that the IRQ was dispatched.
>so the code could look like:
>
>mov dx,60h
>in dx,al
>mov bl,al
>mov al,20h
>mov dx,20h
>out dx,al
>;; bl -> scancode
That's a good start. Write a program to take
over IRQ 1, read bytes from port 60h, and
print them in hex.
You should not use printf() in an interrupt
handler, so use a queue or global variable to
pass the port 60h values to main()
Then, you can switch the keyboard controller
(8042 chip) into different modes: scancode
sets 1, 2, and 3; set-2-to-set-1 translation
or or off. See what difference it makes.
Or, just read all this crap:
http://www.execpc.com/~geezer/os/kbd.txt
http://www.execpc.com/~geezer/os/kbd.c
http://www.execpc.com/~geezer/osd/kbd/index.htm
>>On 2001-02-23 12:58:09, Collin wrote:
>>Hello,
>>I need to find a keyboard driver for my OS. Does
anyone
>>know where I could find some source code?
>>
>>Collin
>It`s quite simple, after the IRQ occurs you have to get
a
>scancode from port 60h and then send to port 20h value
20h
>to tell the controler that the IRQ was dispatched.
>so the code could look like:
>
>mov dx,60h
>in dx,al
>mov bl,al
>mov al,20h
>mov dx,20h
>out dx,al
>;; bl -> scancode
That's a good start. Write a program to take
over IRQ 1, read bytes from port 60h, and
print them in hex.
You should not use printf() in an interrupt
handler, so use a queue or global variable to
pass the port 60h values to main()
Then, you can switch the keyboard controller
(8042 chip) into different modes: scancode
sets 1, 2, and 3; set-2-to-set-1 translation
or or off. See what difference it makes.
Or, just read all this crap:
http://www.execpc.com/~geezer/os/kbd.txt
http://www.execpc.com/~geezer/os/kbd.c
http://www.execpc.com/~geezer/osd/kbd/index.htm
RE:Keyboard Driver
>On 2001-02-24 04:05:42, Chris Giese wrote:
>>On 2001-02-23 13:22:44, Crg^ wrote:
>>>On 2001-02-23 12:58:09, Collin wrote:
>>>Hello,
>>>I need to find a keyboard driver for my OS.
Does
>anyone
>>>know where I could find some source code?
>>>
>>>Collin
>>It`s quite simple, after the IRQ occurs you have to
get
>a
>>scancode from port 60h and then send to port 20h
value
>20h
>>to tell the controler that the IRQ was dispatched.
>>so the code could look like:
>>
>>mov dx,60h
>>in dx,al
>>mov bl,al
>>mov al,20h
>>mov dx,20h
>>out dx,al
>>;; bl -> scancode
>
>That's a good start. Write a program to take
>over IRQ 1, read bytes from port 60h, and
>print them in hex.
>
>You should not use printf() in an interrupt
>handler, so use a queue or global variable to
>pass the port 60h values to main()
>
>Then, you can switch the keyboard controller
>(8042 chip) into different modes: scancode
>sets 1, 2, and 3; set-2-to-set-1 translation
>or or off. See what difference it makes.
>
>Or, just read all this crap:
>
>http://www.execpc.com/~geezer/os/kbd.txt
>http://www.execpc.com/~geezer/os/kbd.c
>http://www.execpc.com/~geezer/osd/kbd/index.htm
Hehheheh, hey Geeze, here's [email protected] ;]
Anyone have a table to convert scancode-> ascii?
>>On 2001-02-23 13:22:44, Crg^ wrote:
>>>On 2001-02-23 12:58:09, Collin wrote:
>>>Hello,
>>>I need to find a keyboard driver for my OS.
Does
>anyone
>>>know where I could find some source code?
>>>
>>>Collin
>>It`s quite simple, after the IRQ occurs you have to
get
>a
>>scancode from port 60h and then send to port 20h
value
>20h
>>to tell the controler that the IRQ was dispatched.
>>so the code could look like:
>>
>>mov dx,60h
>>in dx,al
>>mov bl,al
>>mov al,20h
>>mov dx,20h
>>out dx,al
>>;; bl -> scancode
>
>That's a good start. Write a program to take
>over IRQ 1, read bytes from port 60h, and
>print them in hex.
>
>You should not use printf() in an interrupt
>handler, so use a queue or global variable to
>pass the port 60h values to main()
>
>Then, you can switch the keyboard controller
>(8042 chip) into different modes: scancode
>sets 1, 2, and 3; set-2-to-set-1 translation
>or or off. See what difference it makes.
>
>Or, just read all this crap:
>
>http://www.execpc.com/~geezer/os/kbd.txt
>http://www.execpc.com/~geezer/os/kbd.c
>http://www.execpc.com/~geezer/osd/kbd/index.htm
Hehheheh, hey Geeze, here's [email protected] ;]
Anyone have a table to convert scancode-> ascii?
RE:Keyboard Driver
>On 2001-02-24 04:57:54, Anonymous wrote:
>Anyone have a table to convert scancode-> ascii?
Lots of keyboard info here
http://www.arne.si/~mauricio/Kbdfaq.htm
>Anyone have a table to convert scancode-> ascii?
Lots of keyboard info here
http://www.arne.si/~mauricio/Kbdfaq.htm
reply
All the links to keyboard info & tables are broken, or did not work for me. So here's another one for scancodes : http://www.glue.umd.edu/~NSW/ench250/scancode.htm#Key3
Probably not, but it proves he searched, and anybody using search (which everybody should be using before posting) that finds this link will now have a valid link to find the information since all the olds ones have dissappeared, meaning they don't have to create another post asking the same question .JamesM wrote:Oh well bumped, knobarse. Do you really think that those people posting in 2001 really need the information now?!