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-06 15:32:02 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!gatech!bloom-beacon.mit.edu!crl.dec.com!crl.dec.com!jac.zko.dec.com!xdelta.enet.dec.com!hoffman From: hoffman@xdelta.enet.dec.com (Stephen Hoffman) Newsgroups: comp.sys.dec Subject: Re: big endian and little endian Date: 6 Dec 1994 23:02:09 GMT Organization: Digital Equipment Corporation Distribution: world Message-ID: <3c2qhh$867@jac.zko.dec.com> References: <3c2dc6$8po@serra.unipi.it> Reply-To: hoffman@xdelta.enet.dec.com (Stephen Hoffman) NNTP-Posting-Host: XDELTA Keywords: big endian little endian alpha X-Newsreader: mxrn 6.18-16 In article <3c2dc6$8po@serra.unipi.it>, ferrovia@pimac2.iet.unipi.it (Massimo Macucci) writes: |>This might be in the FAQ, but I have not been able to retrieve it. |>A group here has developed applications on hp workstations, which are |>"different" endian with respect to the Alphas. Now they would like |>to switch to the new Alphas, but they have the problem that binary |>files cannot be exchanged between the hp's and the Alphas due to the |>different byte ordering. |>Does anybody know a good solution for this problem, except for the |>obvious one of rewriting the application ? |> Massimo Macucci I know of no general purpose conversion tool. It's easy to code the simple case(s), but a tool that handled the general case would appear to be a hairy problem in file description specification and parsing... If working in C on OSF/1, there are htonl() and ntohl() routines, and (if I remember correctly) xdr. HP likely supports both, so using the same source code on both platforms appears possible. Alpha floating point is little-endian IEEE. Not sure about HP, but I would suspect it's big-endian IEEE format. (Simple conversion.) Conversions can also be avoided (obviously) if ASCII-format files are used. ------------------------------ Opinionative ------------------------------- Stephen Hoffman, NREMT-I, N1THN hoffman@xdelta.enet.dec.com OpenVMS Engineering, Digital Equipment Corporation, Nashua NH