tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY:Byteorder?
@ 1996-03-25 15:45 Don Wilkerson
  0 siblings, 0 replies; only message in thread
From: Don Wilkerson @ 1996-03-25 15:45 UTC (permalink / raw)
  To: tru64-unix-managers


 The info on the byteorder of the Axp was LOWTOHIGH.
 Thanks for those who responded and please forgive if I left your
 name out:
 
 Chris Mattingly   Chris_Mattingly@eos.ncsu.edu
 Nick Riley        nick@alldata.com
  
 And then to Steven Jenkins who gave the following '.C' program:
 sjenkins@iastate.edu> 

 Here is a quick C program to find out:
 #include <stdio.h>
 
 main(){
         union { char c[4];int i;} sample;
         sample.c[0] = 0x1;
         sample.c[1] = 0x2;
         sample.c[2] = 0x3;
         sample.c[3] = 0x4;
         printf("%x\n", sample.i);
 }
 
 
 If it prints out something like 4030201, then it's big to little,
 if it prints out 01020304 it's little to big.  For what it's
 worth, Alphas are big-to-little.
  
 Now I did this and got 4030201, does that mean big-to-little is
 LOWTOHIGH or HIGHTOLOW??  A majority of my responses says LOWTOHIGH.
 Since I'm still having trouble getting proper results to my '.C'
 programs I still can't tell.
 
 Thanks for all the help.
 don wilkerson
 don@colosys.net
 

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

only message in thread, other threads:[~1996-03-25 15:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-03-25 15:45 SUMMARY:Byteorder? Don Wilkerson

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