A very cool op code in assembly language for Intel microprocessors. Used with a label:

      jecxz   somewhere

It branches the code out to somewhere if the ECX register is equal to 0.

Though designed originally for counters, it is an easy way to test for null pointers. In my OOP I use ECX to pass the this pointer, so each procedure/function starts with a jecxz to an error routine.

Log in or register to write something here or to contact authors.