Specifications
System Macros Invoked by Drivers
SWAPLONG
SWAPLONG
Swaps the bytes within each longword supplied.
Format
SWAPLONG longword
Parameters
longword
The address of the longword data that requires the bytes to be swapped.
Description
When a data word is passed between a host CPU and a device with a differing
byte-order pattern (big-endian and little-endian devices), the byte positions
must be swapped. The SWAPLONG macro reads the location of the 4-byte data
supplied in the longword argument and modifies the byte positions to a mirrored
order.
2–96