I am coding an Os and the keyboard ISR was not working. I screwed my brain a lot until I found what was wrong. You have to enable the keyboard ints using the following code:

mov al,20h
out 64h,al ; Tell keyboard we want to read cmd byte
call Empty8024
in al,60h ; Read in command byte
or al,1 ; set bit 0 (keyboard interrupts enabled)
mov bl,al
mov al,60h
out 64h,al ; Tell keyboard we want to write to cmd byte
call Empty8024
mov al,bl
out 60h,al ; Write byte to keyboard command byte

The Empty8024 is a routine by Victor:

in al, 64h
test al,1
jz empty1
in al, 060h
jmp Empty8024
test al,2
jnz Empty8024
retn 4

Hope this is helpful!! :) :-D :) 8) :P :) 8)
Posted on 2004-08-27 02:05:31 by thomasantony
You should have checked the SOLAR OS source code ;)
It has a functional keyboard driver via ISR in protected mode

But thanks for info, many will find it usefull
Posted on 2004-08-27 13:02:29 by BogdanOntanu
Well, BogdanOntanu, you added the those codes in Setup_Mouse_PS2 which is not very useful since I missed out that part and my keyboard never worked. My keyboard is still not responding.... :x
Posted on 2004-08-27 13:22:27 by roticv
Looks like you are attempting to reprogram the i8042 (Keyboard Controller), it is required in order to access memory over the 1MB mark in protected mode (A20 line). Look at http://www.nondot.org/sabre/os/files/Misc/os-faq/os-faq-memory.html#what_is_a20 for more information on what you are doing.
Posted on 2004-08-27 18:13:09 by SpooK