From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Wed, 27 Nov 2013 13:38:24 -0500 To: skip.tavakkolian@gmail.com, 9fans@9fans.net Message-ID: In-Reply-To: References: <1ebc06ba0079a91546444a93ab21bc65@quintile.net> <12706eb9d1aafea3af76c427a31aae1a@coraid.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] compiler bug? Topicbox-Message-UUID: 8c4f9cc4-ead8-11e9-9d60-3106f5b1d025 On Wed Nov 27 13:07:31 EST 2013, skip.tavakkolian@gmail.com 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