Hi Jan thanks for your help, Steve as mentioned that also, and by looking at the datasheet I found what I wanted. thank you all for your help. when I manage to finish this project I will post it on PICLIST for anybody to use. best regards Luis -----Original Message----- From: Jan-Erik Soderholm XA (TN/PAC) [mailto:jan-erik.xa.soderholm@ERICSSON.COM] Sent: 27 October 2003 12:23 To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]: how to compare to numbers Luis Moreira wrote: > I am using a 16F877A, I know it as something to do with the SUBxx > instruction but can not get my head around it. It should be simple but > I can not get it. Note that the description of the SUBxx instructions in the data sheet for the 16F877A are a bit short. Download the "Midrange ref manual". There, right in the descriptions of the SUBxx instructions, are examples of all three cases (ab) and the status of the Z and C flags in each case. And in general, the descriptions of the instruction in the ref manual are better then those found i the model specific data sheet(s). A *few* data sheets has the same descriptions as in the ref manual, the 16F628A is one of them. Jan-Erik. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body