From owner-freebsd-hackers Mon Nov 20 7:59: 9 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ringworld.nanolink.com (pool137-tch-1.Sofia.0rbitel.net [212.95.170.137]) by hub.freebsd.org (Postfix) with SMTP id 1768F37B479 for ; Mon, 20 Nov 2000 07:59:03 -0800 (PST) Received: (qmail 6780 invoked by uid 1000); 20 Nov 2000 15:58:39 -0000 Date: Mon, 20 Nov 2000 17:58:39 +0200 From: Peter Pentchev To: Alex Koshterek Cc: Thomas Moestl , freebsd-hackers@FreeBSD.ORG Subject: Re: Byte order? Message-ID: <20001120175839.B6292@ringworld.oblivion.bg> Mail-Followup-To: Alex Koshterek , Thomas Moestl , freebsd-hackers@FreeBSD.ORG References: <00112017175200.47740@pro.lookanswer.com> <20001120164006.A1624@crow.dom2ip.de> <00112017513301.47740@pro.lookanswer.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <00112017513301.47740@pro.lookanswer.com>; from havoc@lookanswer.com on Mon, Nov 20, 2000 at 05:47:47PM +0200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, Nov 20, 2000 at 05:47:47PM +0200, Alex Koshterek wrote: > > This program gets it wrong. When the last byte of a long is set after the long was > > set to 1, we have a big endian architecture (the "little" end is at the 4th byte, > > so the "big end" is at the 1st byte). > > The x86 architecture _is_ little endian. > > > What? > on x86 long a =1 > in memory is a 01 00 00 00 > Lesser significant byte is first and most significant is last Exactly - the least significant byte comes first, the number is stored in memory from its 'little' end towards its 'big' end - hence, little-endian. G'luck, Peter -- I am not the subject of this sentence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message