> movf A,w > subwf B,w ; A-B == 0 if A==B -> Z=1 > btfsc STATUS,Z ; btfsc for A!=B and btfss for A==B This is where is use my SKIP_WGT (skip if W was greater than) or SKIP_WLE (skip if W was less than or equal to) macros. These are cases where getting the right sense of Z seems to be particularly confusing. These macros and other related ones are in STD.INS.ASPIC at http://www.embedinc.com/pic. ******************************************************************** Olin Lathrop, embedded systems consultant in Littleton Massachusetts (978) 742-9014, olin@embedinc.com, http://www.embedinc.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.