Conversion from big endian to little endian

Blitz3D Forums/Blitz3D Programming/Conversion from big endian to little endian

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

To swap the endian of a signed, 2byte short, I think you simply swap the byte order, like so:

((n And $00FF) Shl 8) Or ((n And $FF00) Shr 8)