it helps some times It's just taking the address of word, casting it to a char pointer, and putting it in byte. At that point, byte will point to the first byte of 2-byte word, and the value of that byte (1 or 0) will tell you if you're on a big or little endian machine.
Best way to convert a Little Endian four byte long integer to Big Endian, or vice versa in x86 Assembly
like below fixes the issue I have .dll library which use tiff image in big-endian (MM) byte order, but image scanner create image in little-endian (II) byte order. , You can do that with ImageMagick like this: