Hello, I've created a routine for a 24 bit signed compare. 6 byte variables mpos0..2 and wpos0..2 are compared and at the end the result is in two bits; pos_equal (if set pos_sign has no use) pos_sign. I was wandering if anybody has a faster (and/or shorter) routine for this logic-problem. My code: bcf pos_equal // assume not equal; set '0' bsf pos_sign // assume wpos>mpos; set '1' movf wpos2,w // check sign bits to see if one is positive.. xorwf mpos2,w // ..and the other negative or visa versa andlw 0x80 // only look at sign result btfsc 03,2 // if set ->zero=0, skip next goto nosign btfsc wpos2,7 // wpos negative? skip if not bcf pos_sign // yes, so wpos