At first write program for see easily.For example below: IF HARDWARE THEN... IF !HARDWARE THEN... -> H=HARDWARE IF H!=0 THEN ... IF H==0 THEN ...