This invention provides a data processing system capable of performing an
interrupt exception handling routine as many times as the number of times
of occurrence of a request event for the same interrupt exception
handling routine if the request event occurs a plurality of times. A
software interrupt counter or a hardware interrupt counter for retaining
the number of times of occurrence of an interrupt request generation
event counts up when a software processing which generates a software
interrupt or a hardware event that generates a hardware interrupt occurs,
and counts down when a CPU performs a processing for removing the
interrupt request. If the value of the software interrupt counter and the
value of the hardware interrupt counter are not zero, a software
interrupt request signal and a hardware interrupt request signal to the
CPU are asserted.