Multiplexing interrups

a priority encoder would do the job .

regards

Allan