Assembler:Commands:BSWAP
Jump to navigation
Jump to search
command bswap operand
The bswap instruction reverse the byte order of the destination. Its used to convert values from Little-Endian to Big-Endian.
Reverses the byte order of a 32-bit / 64-Bit (destination) register. This instruction is provided for converting little-endian values to big-endian format and vice versa.
To swap bytes in a word value (16-bit register), use the XCHG instruction. When the BSWAP instruction references a 16-bit register, the result is undefined.
Command Parameters[edit]
Parameter | Description |
---|---|
operand | The operand to reverse byte order on |
Examples[edit]
bswap eax
bswap edx
bswap rax
bswap rdx
See also[edit]