For single byte data types, 0b11000000 should be the equiv. of %11000000 in PBP. As far
as "I" know, most C compilers will store byte values as entered. If would really get to be
confusing if you had LSB/MSB of single byte values swapped around in words, longs, unions,
etc.
Endianess normally comes into play when you're dealing with multi-byte data types like longs,
words, etc. Then you may, or may not, need to know how these are stored in data memory.
With PBP MyVar VAR WORD, MyVar =$AABB would be stored little-endian. I.E. if the address
of MyVar starts at 30h, then $BB will be stored at 30h followed by $AA at 31h. C18, HiTech,
and CCS compilers work the same. Some have a compile-time switch you can use to change
byte ordering to big-endian.
In C, when you start dealing with unions, you'll definitely want to know the ordering of bytes
in multi-byte values. The compiler manual should have all that neat stuff.
Bookmarks