Keyboard driver REAL MODE

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

Keyboard driver REAL MODE

Post by matias_beretta »

int37:
in al, 96 ;60h
cmp al, 0 ;NOKEY
je int37
iret

This doesn't work and I can't understand why...
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

Are you converting the values you receive from keyboard scancodes to character codes? Also it doesn't look like you are storing the value you receive anywhere.
User avatar
matias_beretta
Member
Member
Posts: 101
Joined: Mon Feb 26, 2007 3:39 pm

Reply

Post by matias_beretta »

I only want to get the scancode for now... in AL...
Matías Beretta
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

Okay well in real mode the BIOS handles the keyboard, so as soon as the key gets pressed IRQ1 is fired and the BIOS reads the scancode. You could maybe map IRQ1 to an empty function.
exkor
Member
Member
Posts: 111
Joined: Wed May 23, 2007 9:38 pm

Post by exkor »

what are the values after 'in' instruction from different keys? print them on the screen and tell us. How does int37 gets called? after which event? no magicians here.
You could use:
xor ax, ax
int 16h
to wait for key to be pressed
Post Reply