Hi all, I currently have an application where in the comms receive handler, I test the received command byte and branch off to other places depending on the value. As the values are not consecutive, is there a better way to test them than just doing the following time after time? ... movf rx_cmd,w ;get the received command byte xorlw msg_eg1 ;compare with msg_eg1 (a constant) btfsc zero ;is it msg_eg1 ? goto rx_eg1 ;yes, jump to that handler ... Block repeats for as many test cases as I need. It just seems ugly - is there a better/shorter way? The msg constants are all over the place value wise. I can't arrange them to be in continuous blocks. Regards... -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body