>Using standard compare routines from the archive I can make the code >work for positive values, but I am stuck comparing negative values >against positive ones etc. I guess I don't fully understand. If you have a "flag byte" TEMP_MSB that indicates whether you're positive or negative, aren't you making use of it? Doesn't make sense that you can't compare a positive and a negative number differential. ; assume temp differential is 4 degrees for the sake of argument ; and that TEMP_MSB=0xFF (negative value) movlw 0x02 ; which is really -2 if TEMP_MSB==0xFF movwf byte_1 movlw 0x02 ; initial reading to compare against movwf byte_2 incf TEMP_MSB, 0 ; overflow it to 0x00 (maybe) btfss STATUS, Z ; if temp was negative, Z=1 goto $+3 comf byte_1, 1 incf byte_1, 1 ; negate byte if negative movf byte_1, 0 ; compare bytes subwf byte_2, 0 ; now W holds the differential, perform standard C, Z comparisons ; to determine MAX value, etc. Is this not what you're doing? Maybe I'm missing your point. --Andrew _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu