comp.lang.ada
 help / color / mirror / Atom feed
* Lots of Endians
@ 1996-04-15  0:00 W. Wesley Groleau (Wes)
  0 siblings, 0 replies; only message in thread
From: W. Wesley Groleau (Wes) @ 1996-04-15  0:00 UTC (permalink / raw)


> ... not only ... the Endian problem, but also the "which bit is lsb ..."

Even without the bit numbering question, there are more options than
Big Endian/Little Endian.

If you have byte-level addressing, there are 24 ways to store 16#89ABCDEF#

Most of them are probably never used, but unless my memory fails, I once
was forced to cope with (order of increasing addresses).

   AB 89 EF CD

or something like that.  Not really a major issue for integers.  What
made it a problem was in converting a floating point to IEEE-754 for
hand off to a 680x0/68882.  I know this is a job for assembly, but
we did it in Ada anyway.  It was rather irritating to have to separately
rep-spec two pieces of mantissa and reassemble them for output.

Then we discovered the disk IO swapped the bytes back, so we had to re-do
it the easy way after all!

(VAX/VMS if anyone cares)

--
---------------------------------------------------------------------------
W. Wesley Groleau (Wes)                                Office: 219-429-4923
Magnavox - Mail Stop 10-40                               Home: 219-471-7206
Fort Wayne,  IN   46808              elm (Unix): wwgrol@pseserv3.fw.hac.com
---------------------------------------------------------------------------




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-04-15  0:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-04-15  0:00 Lots of Endians W. Wesley Groleau (Wes)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox