From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,c787be2b7bdcca3d X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-01-14 16:15:33 PST Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!agate!spool.mu.edu!olivea!decwrl!deccrl!news.crl.dec.com!jg From: jg@crl.dec.com (Jim Gettys) Newsgroups: comp.sys.dec Subject: Re: Alpha in a big-endian shop? Message-ID: <1993Jan14.200553.18371@crl.dec.com> Date: 14 Jan 93 20:05:53 GMT References: Sender: news@crl.dec.com (USENET News System) Organization: Digital Equipment Corporation, Cambridge Research Lab In article , olson@juliet.ll.mit.edu ( Steve Olson ) writes: > > We are looking at Alpha technology as a possible solution for our > future CPU-intensive computing needs. However, we are a big-endian shop > (Sun and others) and we happen to have a lot of data and software > (both C and Fortran) that uses 16-bit integers. If we had planned on > being both-endian shop way back when, we could of written some of our > code differently. But now we are stuck. Are there any facilities in > OSF/1 and/or the C and Fortran compilers that would help us deal with > this problem? The fortran compiler in particular has facilities for reading big-endian data on reads from the compiler. You can specify a file's byte order and/or floating point data types (IEEE, VAX, Cray, etc) at compile time, by option to the open statement, or by environment variables at run time. You can expect essentially the same kind of things available today on DECfortran on Ultrix, which has such facilities already. This works well unless you do evil equivalence tricks on the data you read, but many/most customers seem to be very happy with the facilities. Unfortunatly, the C language makes the equivalent impossible for C; there are library routines to help with datatype conversions, of course, but you have to do more work yourself. -- Digital Equipment Corporation Cambridge Research Laboratory