Page 1 of 1

Setting AT Scancode ....

Posted: Tue Sep 23, 2003 11:00 pm
by alien
hello all,

      i'm writing the keyboard interrupt. i've heard that scan code set 2 (AT) should be chosen, because it is the mostly supported scancode set. but, when i print the make code and break code of my keyboard when i press a key, i receive only the scan code set 1 (XT). i've tried to set the scan code to 2 by the following code :

xor ax, ax
waitt:
in al, 60h
bt ax, 1
jc wait

mov al, 0F0h
out 60h, al
mov al, 03h
out 60h, al

      but, still the interrupt prints only the scancode set 1(XT). any help will be appreciated.

thank you,

RE:Setting AT Scancode ....

Posted: Tue Sep 23, 2003 11:00 pm
by gaffi
Hi alien,
You have to disable the scancode-translation in the Command-Byte. If you don't do so your keyboard will send AT-codes, but the controller converts them back to XT.

call wait
mov al,0x60
out 64h,al
call wait
mov al,00000011b
out 60h,al

regards,
Daniel Raffler

RE:Setting AT Scancode ....

Posted: Tue Sep 23, 2003 11:00 pm
by alien
Thank you gaffi for ur help