interrupt-on-change on 8051 microcontroller
There seem to be TWO negative edge triggered external interrupts on that microcontroller.  Take your signal, and send it to one interrupt input.  Invert the signal, and send it to the other, and enable both interrupts.