I'm pretty sure this is a stupid question, but is there an easy way to convert a number into it's appropriate bit position? For example, say I have 3 stored in the variable BLAH. How can I turn on bit #3 on PORTB? 4=4, 5=5, etc... I've tried bsf PORTB,BLAH and that obviously isn't correct.. (It appears to set PORTB = address of BLAH.. -- Rob __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu