Hi Scott, Just looking at that code again - I'm not sure now that your incfsz will even fix it. For example if you have the number: x0201 = X and xff02 = Y then we will get to the incfsz point in the code and the ff MSB will be incremented to 0, and the subtraction is skipped, then it checks the C bit - which the incfsz instruction does not set - so there is still problems with that code because the C bit is set from the LSB previous subtraction still, but we are looking at the MSB now... From: Scott Dattalo Subject: Re: [PIC]: 16-bit 16c7xx comparison code Date: Tue, 10 Apr 2001 22:33:19 -0500 MIME-Version: 1.0 I'm not the original author. I think Bob also got accused of writing that code too. But in reality it predates both of us by years. There's nothing wrong with the code, by the way (except that the incf should've been an incfsz). Scott _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu