Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: jg@crl.dec.com (Jim Gettys)
Subject: Re: Alpha in a big-endian shop?
Date: 14 Jan 93 20:05:53 GMT	[thread overview]
Message-ID: <1993Jan14.200553.18371@crl.dec.com> (raw)
In-Reply-To: OLSON.93Jan14133323@silvius.juliet.ll.mit.edu

In article <OLSON.93Jan14133323@silvius.juliet.ll.mit.edu>, 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


      reply	other threads:[~1993-01-14 20:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-01-14 18:33 Alpha in a big-endian shop?  Steve Olson 
1993-01-14 20:05 ` Jim Gettys [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