TAR DOES NOT SWAP BYTES
Doug Gwyn <gwyn>
gwyn at brl-tgr.ARPA
Fri Sep 27 08:20:26 AEST 1985
> There are known cases of brain-damaged *hardware* swapping bytes. The case
> I know of is a big-endian Multibus machine with an extremely stupidly
> designed tape controller. If you write a tape on this machine, and want to
> read it in on a sane machine, you have to stick "dd" in front of the "tar"
> (or "cpio" or whatever).
>
> The rule for correctness of byte order in a tape controller is simple. If
> you have the string "Now is the time for all good parties to come to the aid
> of man" in memory, and tell the tape controller to write this to a tape, the
> first byte in the block should be a capital "n", followed by a lower-case
> "o", followed by a lower-case "w", followed by a blank, etc.. Violate this
> and you'll force everybody who didn't violate this to swap bytes when
> reading your tapes.
Yup, I believe IBM started this byte-swapping magtape foolishness
because of some bogus idea about big-endian byte order being "more
natural" on some 16-bit machine they had. Some magtape controllers/
interfaces have jumpers to allow them to be operated in either normal
or swabbed mode.
More information about the Comp.unix.wizards
mailing list