Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: "David G. Koontz" <koontz@ariolimax.com>
Subject: Re: Indian ?
Date: 1998/07/31	[thread overview]
Message-ID: <35C2831B.167EB0E7@ariolimax.com> (raw)
In-Reply-To: 6prsjc$k4i$1@nnrp1.dejanews.com

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.



  parent reply	other threads:[~1998-07-31  4:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-31  4:00 Indian ? ludo
1998-07-31  4:00 ` Joachim Wesner
1998-07-31  4:00 ` David G. Koontz [this message]
1998-07-31  4:00 ` Craig Burley
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