bill2009:
could you just have a tight loop that reads all 12 bits and does a table lookup or hash function to get the 4 output bits? Don't worry about changes - just translate 12 bits to 4.
very interesting idea/approach!
Basically I have 4 analog functions I am controlling and each has a set of three interrupts associated with it. However each function can also operate in three different modes (controlled by a mode switch which can be polled very infrequently).
I was planning to at least try something simmilar to what you suggested and simply read the pin data registers in a solid block, quickly determine the new output state of all 4 output pins and then write to the output data register in a single write.
Using hash function or lookup table will still be useful and can be based on a formula of the three modes + 3 possible input states to determine output state for a single pin.