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-09 08:20:54 PST Newsgroups: comp.sys.dec Path: bga.com!news.sprintlink.net!hookup!olivea!news.hal.COM!decwrl!netcomsv!vulcan!robert From: robert@accelr8.com (Robert Hickler) Subject: Re: big endian and little endian Message-ID: Keywords: big endian little endian alpha Organization: Accelr8 Technology Corporation References: <3c2dc6$8po@serra.unipi.it> <3c2qhh$867@jac.zko.dec.com> Date: Fri, 9 Dec 1994 15:31:19 GMT In article <3c2qhh$867@jac.zko.dec.com>, Stephen Hoffman wrote: > >In article <3c2dc6$8po@serra.unipi.it>, ferrovia@pimac2.iet.unipi.it (Massimo Macucci) writes: >|>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... Accelr8 has a commercial general purpose tool called Open TRANSL8 that handles byte swapping (and VAX <--> IEEE floating point) conversion. It is driven by a file specification. Send mail if you want to know more. > > 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.) True. > > Conversions can also be avoided (obviously) if ASCII-format files are > used. True again. > > ------------------------------ Opinionative ------------------------------- > Stephen Hoffman, NREMT-I, N1THN hoffman@xdelta.enet.dec.com > OpenVMS Engineering, Digital Equipment Corporation, Nashua NH > Robert Hickler Tel (303) 863-8088 robert@accelr8.com Fax (303) 863-1218 Open Software Solutions(tm) from Accelr8 Technology