Quantcast
Channel: Take Command / TCC
Viewing all articles
Browse latest Browse all 1683

swap endianness in a binary file

$
0
0
Since tpipe /simple=61 doesn't work for my needs, what is the easiest way to do it?
I have a long list of 32-bit hexadecimal numbers:
f8000008
f80225fc
f88b4d37
f89689e3
f877aeeb
(snip)

And I want to change the endianness of it to:
080000f8
fc2502f8
374d8bf8
e38996f8
ebae77f8

So it's not just a reversal of the bytes - that would cause f8 to become 8f. In this case I want 2 bytes kept together but the groups of 4x2 to be reversed.

I could use a DO loop and @INSTR. I'm not sure how...

Read more

Viewing all articles
Browse latest Browse all 1683

Trending Articles