> > Scan_Keys: movf PORTB,w ; > movwf scratchpad ;put PORTB in a temp register > xorwf keys,w ;compare to last rounds winners > btfsc STATUS,Z ;Z=0 if same The comment and the instruction don't quite match up. Z=1 if keys = scratchpad. It's a little confusing at first glance, especially if you haven't even had your first morning cuppa ;-) -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics