SWAB(3) — System Interface Manual — Subroutines
NAME
swab − swap bytes
SYNOPSIS
swab(from, to, nbytes)
char ∗from, ∗to;
DESCRIPTION
Swab copies nbytes bytes pointed to by from to the position pointed to by to, exchanging adjacent even and odd bytes. It is useful for carrying binary data between high-ender machines (IBM 360’s, MC68000’s, etc) and low-ender machines (PDP-11’s and VAX’es).
Nbytes should be even.
Sun System Release 1.0 — 23 August 1983