From: lionel@quark.enet.dec.com (Steve Lionel)
Subject: Re: Endian problems with the Alpha
Date: 1996/05/04 [thread overview]
Message-ID: <4mea6v$tg1@zk2nws.zko.dec.com> (raw)
In-Reply-To: 31883EE2.59FEC2A2@rt66.com
In article <31883EE2.59FEC2A2@rt66.com>, Kevin Barrett <kbarrett@rt66.com>
writes:
>Does anyone know of
>a facility provided by OSF's C compiler (or the Alpha itself) to automatically
>operate on big-endian values? Might there be a library of good (efficient)
>conversion routines we can use? We also have to do some conversions of
>floating-point formats (IEEE/IBM). Any response would be appreciated...
The C compiler doesn't provide this (though Fortran does if you use
unformatted I/O.) Endian-conversion is a rather simple task, especially
when done with shifts and masks.
There is a cvt_ftof routine (see the man page for it) that will convert
between IEEE and IBM System\360 format (among others). IBM workstations use
big-endian IEEE. I think that cvt_ftof may even be able to do
endian-conversions on IEEE floats.
Steve Lionel mailto:lionel@quark.zko.dec.com
Fortran Development http://www.digital.com/info/slionel.html
Digital Equipment Corporation
110 Spit Brook Road, ZKO2-3/N30
Nashua, NH 03062-2698 "Free advice is worth every cent"
For information on Digital Fortran 90, see http://www.digital.com/info/hpc/f90/
prev parent reply other threads:[~1996-05-04 4:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-05-01 4:00 Endian problems with the Alpha Kevin Barrett
1996-05-04 4:00 ` Steve Lionel [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