I need to know the full interrupt handling algorithm, I found this algorithm on the Internet, is it correct? If not, how will it be right?
- The request is stored in the register IRR
- Ignore all requests that are masked in the IMR register.
- If there is at least one request, the request with the highest priority is taken and compared with the ISR register, to what priority the interrupt is currently performed
- If the interrupt priority is higher, a signal is sent to the processor and a response is expected.
- Having received the answer, the bit is reset in IRR with high priority and the corresponding one is set in ISR
- An interrupt code is sent to the processor.
- At the end of the interrupt bit is reset in the ISR