Keyboard Encoding and Usage
Encoding
The keyboard routine provided by IBM in
ROM
BIOS
is
responsible
for
converting the keyboard scan codes into what
~ill
be termed "Extended ASCII".
Extended ASCII encompasses one byte character codes with
possible values of 0-255, an extended code for certain extended
keyboard functions and functions that are handled within the
keyboard routine or through interrupts.
Character Codes
The following character codes are passed through the BIOS
keyboard routine to the system or application program. A
"-1"
means the combination
is
suppressed in the keyboard
routine. The codes are returned in AL. See Appendix C for exact
codes. Use keyboard Scan Code diagram for reference page 2-17.
Table
25.
Character Codes
KEY#
BASE
CASE
UPPER
CASE
CTRL
ALT
1
ESC ESC
ESC
-1
2 1
Y2
-1
Note
1
3 2
@
NU
L
(000)
Note
1
Note
1
4 3
#
-1
Note
1
5 4
$
-1
Note
1
6
5
%
-1
Note
1
7
6
1\
RS
(030)
Note
1
8
7
&
-1
Note
1
9
8
*
-1
Note
1
10
9
(
-1
Note
1
11
0
)
-1
Note
1
12
-
US
(031)
Note
1
-
13
=
+
-1
Note
1
14
Backspace
(008)
Backspace
(OOS)
DEL(127)
-1
15
---+t
(009)
I+-
(Note
1)
-1
-1
16
q 0
DCl
(017)
Note
1
17
w W
ETB
(023)
Note
1
18
a
E
ENQ
(005)
Note
1
19
r
R
DC2
(018)
Note
1
20
t T
DC4
(020)
Note
1
Y
21
Y
EM
(025)
Note
1
22
u U
NAK
(O21)
Note
1
23
i I
HT
(O09)
Nota
1
24
0
0
SI
(O15)
Note
1
25
p P
OLE
(O16)
Note
1
26
[
!
ESC
(O27)
-1
27
]
I
GS
(029)
-1
3-11