If you weren't already aware,
MOV AH, 0
INT 16h
waits for a key press (other than any kind of "shift"), and returns with
the ASCII code in AL and the scan code in AH
Note that the BIOS will have had an opportunity to "process" the
information from the keyboard, and substitute a different ASCII code or
Scan code "for your convenience" (such as "correcting" a
non-standard
kayboard), converting duplicated keys into their legacy values, etc.
NOT FOR XT: function 10h does not do as much "processing", and will give
different codes for some duplicate keys
These are NOT the only BIOS functions for keyboard, and it is not hard to
go below the BIOS if you want to look for non-standard combinations, such
as differentiating between L, R, or both shift keys.