11.9 Packing Data Stored in Flash

The DSC core families use a 24-bit Flash word size. The architecture supports the mapping of areas of Flash into the data space, as discussed in the 11.3 Variables in Program Space section. Unfortunately this mapping is only 16 bits wide to fit in with data space dimensions.

The compiler supports using the upper byte of Flash via packed storage. Use of this upper byte can offer a code-size savings for large structures, but this is more expensive to access. The type-qualifier __pack_upper_byte added to a declaration indicates that the variable should be placed into Flash memory and use the upper byte. Unlike other qualifiers in use with the MPLAB XC-DSC C Compiler, such as __psv__, this qualifier combines placement and access control.