You cannot test the zero bit with a AND MASK (OR, XOR, etc), this affects the zero bit. You must use BTFSS or BTFSC instructions which do not affect it. Ed Todd