swaplwbytes.3

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3 代码 · 共 55 行

3
55
字号
.TH swap_lw_bytes 3.SH Nameswap_lw_bytes, swap_word_bytes, swap_words \- perform byte swapping operations.SH Syntaxunsigned int swap_lw_bytes\^(\^\fIbuffer\fP\^).brunsigned int \fIbuffer\fP\^;.spunsigned int swap_word_bytes\^(\^\fIbuffer\fP\^).brunsigned int \fIbuffer\fP\^;.spunsigned int swap_words\^(\^\fIbuffer\fP\^).brunsigned int \fIbuffer\fP\^;.SH Arguments.IP \fIbuffer\fP 1.0iSpecifies a 32-bit (4 bytes) quantity..SH Description.NXR "byte swapping"The.PN "swap_lw_bytes" routine performs a long word byte swap.The.PN "swap_word_bytes" routine performs a short word byte swap.The.PN "swap_words" routine performs a word byte swap.Because Digital devices support the little endian model of byteordering, there isa need for these byte swapping routines..PPFor the purposes of the following discussion, a long word is equal to 4 bytes; ashort word is equal to 2 bytes; and 1 byte is equal to 8 bits.The.PN "swap_lw_bytes" routine takes the 32-bit quantity specified by the\fIbuffer\fPargument and swaps all four bytes.The.PN "swap_word_bytes" routine takes the 32-bit quantity specified by the\fIbuffer\fPargument and swaps the individual bytes that make up each byte of the32-bit quantity.The.PN "swap_words" routine takes the 32-bit quantity specified by the\fIbuffer\fPargument and swaps the two words..SH Return ValuesThese routines return the result of the byte swapping.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?