What happens when you press a key on keyboard

Below step by step execution will happen when we pressed a key on the keyboard:-1) The keyboard sends a scan code of the key to the keyboard controller (Scan code for key pressed and key released is different)2) The keyboard controller interprets the scan code and stores it in a buffer3) The keyboard controller sends a hardware interrupt to the processor.This is done by
putting signal on “interrupt request line”: IRQ 14) The interrupt controller maps IRQ 1 into INT 95) An interrupt is a signal which tells the processor to stop what it was doing currently
and do some special task6) The processor invokes the “Interrupt handler” CPU fetches the address of “Interrupt Service Routine” (ISR) from “Interrupt Vector Table” maintained by the OS (Processor use the IRQ number for this)7) The ISR reads the scan code from port 60h and decides whether to process it or pass the control to program for taking action.

News Reporter

Leave a Reply

Your email address will not be published. Required fields are marked *