From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,a8941d98b6cc37ef X-Google-Attributes: gid111c93,public From: "David G. Koontz" Subject: Re: Indian ? Date: 1998/07/31 Message-ID: <35C2831B.167EB0E7@ariolimax.com>#1/1 X-Deja-AN: 376868816 Content-Transfer-Encoding: 7bit References: <6prsjc$k4i$1@nnrp1.dejanews.com> Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsabuse@supernews.com X-Trace: 901939457 MPCBFHUBS67EBCDB3C usenet77.supernews.com Organization: Ariolimax Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha ludo@isbank.is wrote: > > Silly question from me is the Alpha a big or little indian byte user ? > Ludo > -- ---- union word_struct { unsigned long longword; unsigned char charword[4]; }; main () { union word_struct wd_array; int i; wd_array.longword = 0x41424344; /*"ABCD"*/ printf("word array long word = %x\n",wd_array.longword); for (i = 0; i < 4; i++) printf("wd_array,charword[%d] = %x\n",i,wd_array,charword[i]); } ---- little endian, opposite of a SPARC.