From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,4e5ff08a0f67018 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-10-03 08:02:29 PST Newsgroups: comp.sys.dec Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!sol.ctr.columbia.edu!news.kei.com!world!cmr From: cmr@world.std.com (Charles M Richmond) Subject: Re: "byte sex" or "endian" conversion program Message-ID: Organization: Integrated International Systems Corp. One Longfellow Place, Suite 3309, Boston, Ma. References: <1993Oct2.212547.17237@syma.sussex.ac.uk> Date: Sun, 3 Oct 1993 14:56:56 GMT Newsgroups: comp.sys.dec Subject: Re: "byte sex" or "endian" conversion program References: <1993Oct2.212547.17237@syma.sussex.ac.uk> sandell@epunix.susx.ac.uk (Greg Sandell) writes: >I work across several platforms including one DEC and several non-DEC >machines. The DEC represents binary differently than all the others. >(I suppose this isn't news to many people who read this bboard!) I've >been told that the difference between standards is merely a swapping of >the upper and lower signficant portions of the value. However, when >I've tried my own conversion programs (reading in a binary value then >writing it out swapped) they don't work. There must be something I >don't know. This kind of misinformed and disgruntled muttering has finally irritated me to the point of sending out a small flame. First off, the writer is blaming his ignorance of big/little endian on DEC. The vast majority of systems in the world are byte organized in the same way as the DEC systems. This is demonstrably true when one considers that all of the IBM PC systems are in this group. Secondly, just doing a "man -k swap" yields the following: DS3100 ULTRIX 4.3 asoko.iisc.com:267:man -k swap fpc, get_fpc_csr, set_fpc_csr, swapRM, swapINX (3) - floating-point control reg isters swab (3) - swap bytes swapon (2) - add a swap device for interleaved paging/swapping swapon (8) - specify additional device for paging and swapping swap_lw_bytes, swap_word_bytes, swap_words (3) - perform byte swapping operatio ns swap_word, swap_half, swap_filehdr, swap_aouthdr, swap_scnhdr, swap_hdr, swap_fd , swap_fi, swap_sym, swap_ext, swap_pd, swap_dn, swap_opt, swap_aux, swap_reloc, swap_ranlib (3) - swap the sex of the specified structure SUNOS !$ man -k swap swab (3) - swap bytes swapon (2) - add a swap device for interleaved paging/swapping swapon (8) - specify additional device for paging and swapping vswap (1) - convert a foreign font file !$ DEC OSF2.0 (1.2 and 1.3 are similar in content) aijin> man -k swap fstab (4) - Static information about file systems and swap partiti ons swab (3) - Swaps bytes swapctl (2) - manages the system swap space swapon (2) - Adds a swap device for interleaved paging and swapping swapon (8) - Specifies additional file for paging and swapping swapsex (3) - swap the sex of the specified structure Charlie -- ***************************************************************************** * Charles Richmond Integrated International Systems Corporation * * cmr@world.std.com * * Specializing in UNIX, X, Image Processing, and Communications. *