IRQ Keyboard

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
matias_beretta
Member
Member
Posts: 101
Joined: Mon Feb 26, 2007 3:39 pm

IRQ Keyboard

Post by matias_beretta »

I want to set up keyboard in real mode, is it ok?

;;;;;;;

push 0
pop es
mov word [es:36], handler
mov [es:38], cs
jmp $

handler:
in al, 96
iret

;;;;;;;

so each time i press a key , the scan code will be in al??
Matías Beretta
Jim
Member
Member
Posts: 27
Joined: Sun Nov 05, 2006 3:46 am

Post by Jim »

Please add comments to your code
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

yes.

As a side note, please use 0x60 instead of 96 cos it confused the hell out of me...
User avatar
lukem95
Member
Member
Posts: 536
Joined: Fri Aug 03, 2007 6:03 am
Location: Cambridge, UK

Post by lukem95 »

most people use hexadecimal numbers for i/o ports etc
Post Reply