From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,380f3b52dd76ab91 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-12-14 06:45:10 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!gatech!concert!bigblue.oit.unc.edu!bigmax.bme.unc.edu!frey From: Eric Frey Newsgroups: comp.sys.dec Subject: Re: big endian and little endian Date: 14 Dec 1994 14:32:10 GMT Organization: UNC Deptartment of Biomedical Engineering Distribution: world Message-ID: <3cmvla$1aei@bigblue.oit.unc.edu> References: <3c2har$q6n@jac.zko.dec.com> <3c2rfu$bcu@news.duke.edu> NNTP-Posting-Host: bigmax.bme.unc.edu Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: Nuntius Version 1.3b18_68K X-XXMessage-ID: X-XXDate: Wed, 14 Dec 1994 14:31:14 GMT In article <3c2rfu$bcu@news.duke.edu> Andrew Gallatin, gallatin@isds.duke.edu writes: >Alternatively, they could convert their data files using dd & the >conv=swab option: >%dd if=file.hp of=file.dec conv=swab > I really don't think swab will work for float or 4 byte integers. This swaps every other pair of bytes, which is o.k. for 2 byte integers. For 4 byte data elements such (integer and float) you need to swap things as follows: 1,2,3,4->4,3,2,1 This is the way we've been doing swaps between various little endian (mips, alpha) and big endian (hp, sun, stardent) platforms for a long time. Eric Frey UNC-CH Biomed. Eng.