Use registers as parameter?
registers are nothing but pointers to memory addresses. so the best way to "parameterize" them is to do so via pointers.

assuming that ICRi is of 8-bit types - they are NOT to be sure:

uint8_t *ICRs[4];  //isr pointers

//initialize the icrs
ICRs[0]=(uint8_t *)&amp;ICR0;
ICRs[1]=(uint8_t *)&amp;ICR1;
...

*ICRs[i]=icr; //assign value to ICRi


note: that piece of code isn't operable in reality. The way to go is to use a pointer to void. But I'm sure you can figure that out.