the Go to C switch got me :) (no breaks!); couldn't see why more than one
byte was getting the 'x' value! changing buf to "1234" made it more obvious.


On Wed, Nov 27, 2013 at 10:38 AM, erik quanstrom
<[email protected]>wrote:

> On Wed Nov 27 13:07:31 EST 2013, [email protected] wrote:
>
> > why is mips different (erik's version)?
> >
> > supermic% ./8.out
> > 78780000
> > mikro% ./v.out
> > 7878
> > rpi% ./5.out
> > 78780000
> >
>
> because it's big endian.  what you're doing there is
> putting bytes in specific positions.  in this case you have
> bytes (in hex):
>
>         0 0 78 78
>
> on a little endian machine this is 0x78780000 and on a
> big-endian machine this is 0x00007878.
>
> - erik
>

Reply via email to