Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: Eric Frey <frey@bme.unc.edu>
Subject: Re: big endian and little endian
Date: 14 Dec 1994 14:32:10 GMT	[thread overview]
Message-ID: <3cmvla$1aei@bigblue.oit.unc.edu> (raw)
In-Reply-To: D0Jv48.9tH@accelr8.com

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.


      reply	other threads:[~1994-12-14 14:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-12-06 19:17 big endian and little endian Massimo Macucci
1994-12-06 20:24 ` Steve Lionel
1994-12-06 23:18   ` Andrew Gallatin
1994-12-06 21:26 ` Bruce Gordon
1994-12-06 23:02 ` Stephen Hoffman
1994-12-09 15:31   ` Robert Hickler
1994-12-14 14:32     ` Eric Frey [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox