David BALDWIN wrote: > > Does anybody has a set of well-known (for you...) functions like: > > if A>B then goto ... > if A<=B then ... else ... > ... etc In case when B is constant and A>B construction need: ;A>B then goto ADDR MOVFW A SUBLW B SKPC ;SKIP IF A<=B GOTO ADDR ;GOTO IF A>B ....... ADDR: In case when A and B are variables and A<=B construction need: ;A<=B MOVFW A SUBWF B,W SKPC ;SKIP IF A<=B GOTO ELSE THEN: ..... ELSE: ..... At any situation check Carry bit status after SUBWF operation was carry out. SUBWF REG,W result to Carry=1 if (REG-W)>=0 else Carry will be equal zero(0). SUBLW CONST result to Carry=1 if (CONST-W)>=0 else Carry=0. WBR Dmitry. P.S. It's common question as I see, at more definite situation probably exist better solution.