Typically, I'll define bit-ordinal symbolics for "flags" that I'll want to manage using the bit-wise instructions, such as: #define DATA_RDY 0x1 ... bsf FLAGS, DATA_RDY ; i.e. set Bit 1 in FLAGS ... btfsc FLAGS, DATA_RDY ; i.e. test Bit 1 in FLAGS goto svc_data_rdy ... etc. This all works just fine, but now and then I wish the architecture would allow the bit-ordinal value to be expressed in 'W', (i.e. as a "computed" value, rather than a compiled constant in the code), so I could do something like: btfsc FLAGS, W ; (NOT a valid instruction :^( ... Any opinions on what the "next best" approach might be? I'm thinking that a bit-ordinal index w.r.t. PCL might be the ticket, but just wonder if there might be more tricks I'm unaware of. Thanks! Jim > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.