(To make things easier for the beginning, I forgot about protected mode for the moment...)
I'm having my keyboard ISR up and running. To translate between scancodes and character codes I'm using an array of 128x2 bytes: the first byte for a normal keypress and the second one for a shifted keypress. Unfortunately I'm having trouble detecting the shift status. Keeping track of all the key press and releases is a pain. At 0x0000:0x0417 (http://www.josheli.com/assembler/alang_ ... emory.html) should be a word telling me among other things about the shift status but the following code doesn't work 'cause it allways returns the non-shifted (lowercase) character:
Code: Select all
DS is correctly set, BX contains <offset address of my translation table>+<scancode>*2
MOV AX, 0x0000 ; load segment for keyboard status memory
MOV ES, AX
MOV AX, [ES:0x0417] ; load status word
AND AX, 0x0003 ; mask shift bits (bit0 and bit1)
JZ .load ; result zero means no modifier key pressed
INC BX ; otherwise select shifted character from keymap
.load
MOV AL, [DS:BX] ; load character
OR AL, AL ; filter unmatched scancodes
JZ .done
What am I missing?