After a lot of reading about interrupt handling etcetera, i still can figure out the full process of interrupt handling from the very beginning.
For example: A division by zero. The CPU fetches the instruction to divide a number by zero and send it to the ALU. Assuming the the ALU started the process of the division or run some checks before starting it.
- How the exception is signaled to the CPU ?
- How the CPU knows what exception has occurred from only one bit signal ? Is there a register that is reads after it gets interrupted to know this ? 2.How my application catches the exception? Do i need to write some function to catch a specipic SIGNAL or something else? And when i write expcepion handling routine like Try {} Catch {} And an exception occurres how can i know what exeption is thrown and handle it well ?
The most important part that bugs me is for example when an interupt is signaled from the keyboard to the PIC the pic in his turn signals to the CPU that an interrupt occurred by changing the wite INT. But how does the CPU knows what device need to be served ? What is the processes the CPU is doing when his INTR pin turns on ? Does he has a routine that checks some register that have a value of the interrupt (that set by the PIC when it turns on the INT wire? )
Please don't ban the post, it's really important for me to understand this topic, i read a researched a couple of weaks but connot connect the dots in my head.
Thanks.