In real mode assembly, I use this code:
mov ah, 0h
int 0x16
to wait for a keyboard input. I know when a key is pressed, the information about the key I press is stored in ah and al registers. For example, when I press ENTER, 0x0D will be stored in al register. And if I press backspace, that would be 0x08. But these are the only two keys I know about.
Is there a list for ALL the keyboard keys? For example, when I press 'a', what will the al/ah value be? (ASCII tables have no info about this.)
From RBIL:
KEYBOARD - GET KEYSTROKE
AH = 00h
Return:
AH = BIOS scan code
AL = ASCII character
ah
will contain the keyboard scancode and al
the ASCII character.
Every key has two scancodes (press & release). It is returned by the keyboard controller and further abstraction layers provide a mapping from scancodes to a certain character set (such as ASCII), so users can operate on the character set values instead.
A list of scancodes can be found here (thanks @MichaelPetch). However, scancodes have evolved along with the IBM PCs, so there are multiple sets of scancodes, which are partially compatible, though. If you use the scancodes pay attention to what type of scancodes you are using.
For future questions, always look at Ralph Brown's Interrupt List (RBIL) first - good stuff there.