SUMMARY:Byteorder?

From: Don Wilkerson <don_at_tripath.colosys.net>
Date: Mon, 25 Mar 1996 08:45:24 -0700 (MST)

 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_at_eos.ncsu.edu
 Nick Riley nick_at_alldata.com
  
 And then to Steven Jenkins who gave the following '.C' program:
 sjenkins_at_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_at_colosys.net
 
Received on Mon Mar 25 1996 - 17:21:51 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT