It will still show using my method.
The " ^ " symbol is the exclusive OR logic function in C. It takes two 8-bit values and returns an 8-bit result which has a '1' if the bit in one value is different to the same bit in the other. It s the difference that makes the bit '1', it doesn't matter if the bit went high or low. For example:
old port bits = 00001111
new port bits = 01001111
result = 01000000 because bit 6 changed
old port bits = 10101010
new port bits = 10101000
result = 00000010 because bit 1 changed
So if you sample the port before and after the IOC, exor the two values, the result is a map of which bit or bits changed.
Brian.