Page 1 of 1

Byte swap in C Backend?

Posted: Thu Oct 03, 2024 10:57 am
by Wolfram
How can I do a 16Bit or 32Bit Byte swap in C?
In Assembly I can use one operation to do it. How can I get the same result of Code in PB C Backend?

16 Bit
!rol ax, 8

32Bit
!bswap eax

Re: Byte swap in C Backend?

Posted: Thu Oct 03, 2024 11:44 am
by infratec

Re: Byte swap in C Backend?

Posted: Thu Oct 03, 2024 12:02 pm
by Wolfram
👍