Most PCs have special hardware that performs keyboard scanning and debounce. When a key is pressed, the hardware places the resulting Keyboard scancode in I/O port 60h and generates an Int 09h keyboard interrupt. The IRQ1 (Int 09h) service routine processes the scancode, producing a 16-bit keycode which is placed in a key buffer.