>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?