>> =A0 =A0overlay uint8_t *inBufPtr; >> =A0 =A0overlay uint8_t bitIn =3D startBit; >> =A0 =A0overlay uint8_t bitOut =3D 0; >> =A0 =A0overlay uint8_t outIndex =3D 0; > > Is this the equivalent of a Union? > No. See section 2.3.1 of the C18 User Guide: "The MPLAB C18 compiler introduces a storage class of overlay. The overlay storage class applies only when the compiler is operating in Non-Extended mode (see Section 1.2.5 =93Selecting the Mode=94). The overlay storage class may be a= pplied to local variables (but not formal parameters, function definitions or global variables). The overlay storage class will allocate the associated symbols into a function-specific, static overlay section. Such a variable will be allocated statically, but initialized upon each function entry. ... The advantage of using overlay locals is that they are statically allocated, which means that, in general, fewer instructions are required to access them (resulting in a smaller program memory image). At the same time, the total data memory allocation required for these variables may be less than what would be required had they been declared as static due to the fact that some of the variables may be overlaid." -Scott -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist