On Thu, Mar 12, 2015 at 1:31 AM, wrote: > Do both operations in a single statement including shifting the field > values. O better yet create a a macro to set a field and let the xompiler > sort out what operations to use, Hi Walter, I'm not sure I understand your first suggestion. In my particular case I suppose I could add a shift in there. I had been planning on keeping the two bits in their own lookup table in the correct bit place, but it would probably be easier to keep them right justified. In that case, my statement might be: target =3D (target & 0b11110011) | (arrayofvalues[X] << 2); How does that look? Thanks! Josh --=20 A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .