On Wed, 11 Apr 2001, M Core wrote: > 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... Sigh, there are two mistakes (so far) in that snippet. ;XH:XL YH:YL movf yl,w subwf xl,w movf yh,w skpc ;(was skpz) incfsz yh,w ;(was incf) subwf xh,w skpnc goto x_is_greater_than_or_equal_to_y There are 8 instructions, so there may be 6 more mistakes! -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu