16. When the mouse initiates a hardware interrupt to the CPU, how does the CPU know where to find a program to service the mouse?  ?

2 Answers

Relevance
  • 2 months ago

    there is a dedicated interrupt point in the operating system that the mouse hardware interrupt transfers control to. that is itself a pointer to the stack of programs currently resident in the machine and the one corresponding to the location of the mouse then receives the interrupt

    • Commenter avatarLog in to reply to the answers
  • 2 months ago

    In an full operating system (such as Windows OSX or Linux etc.,) the device driver registers itself against any relevant interrupt(s), so the OS routes interrupts to it for the device it handles.

    In an embedded system, interrupt routing is usually hard-coded by the programmer to suit the hardware design.

    • Commenter avatarLog in to reply to the answers
Still have questions? Get answers by asking now.