Hello Jennifer. Slightly different variant: (i don't like to use GOTO operator ;))) ;1 MOVFW X SUBWF Y,W ;2 SKPC MOVFW Y SKPC SUBWF X,W ;3 SUBWF DIFF,W ;.... But i think code with with Zero_constant register will be shorter ;2 SKPC SUBWF ZERO_VAL,W ;3 WBR Dmitry. > For example... the two numbers, X & Y, are in registers which must > remain unchanged are to be tested to determine whether they are within > DIFF of each other. > > My first try this year is: > > MOVF X,W ;Try it this way > SUBWF Y,W > > SKPNC ; Positive? > GOTO POS ; Yes > > MOVF Y,W ; No, then do it the other way > SUBWF X,W > > POS SUBWF DIFF,W ; Compare against the limit > > SKPNC ; The carry knows... > GOTO LESS