I am working with PIC16F84 chips. I was wondering what the best way was to compare a file register to a number and to compare a file register to another file register. This is what I have come up with. Could someone please check the validity of the following statements? Compare a file register to a number. For example to compare COUNT to the number 12. movf COUNT,w sublw d'12' COUNT < 12 , if C flag <> Z flag COUNT = 12 , if Z flag = 1 COUNT <= 12 , if C flag = 1 COUNT > 12 , if C flag = 0 COUNT >= 12 , if C flag = Z flag What is the best way to check [C flag <> Z Flag] and [C flag = Z Flag] Compare two file registers to each other. For example to compare COUNT1 to COUNT2. movf COUNT1,w subwf COUNT2,w COUNT1 < COUNT2 ,if C flag <> Z flag COUNT1 = COUNT2 ,if Z flag = 1 COUNT1 <= COUNT2 ,if C flag = 1 COUNT1 > COUNT2 ,if C flag = 0 COUNT1 >= COUNT2 ,if C flag = Z flag Any help would be greatly appreciated. Thank You.