Byte Order Specification Directives

The .msb and .lsb directives determine the byte order of data assembled by the datan, realn, and .xdatan data allocation statements. The values of n for data and .xdata are 1, 2, 4, and 8. The values of n for real are 4, 8, 10, and 16. See Data Allocation section for more information about data allocation statements.

The .msb and .lsb directives change the byte order for current sections only. They do not affect the instructions that are assembled. They only affect the data created. The default byte order is little-endian.

The .msb directive switches to MSB, where the most-significant byte is stored at the lowest address (big-endian). The .lsb directive switches to LSB, where the least-significant byte is stored at the lowest address (little-endian).

The byte order is a property of each section. If the byte order is changed in one section, it remains in effect for that section until the byte order is redefined. This change does not affect the byte order of other sections in the assembly program.