From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22630 invoked by alias); 5 Dec 2001 18:11:14 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 21974 invoked from network); 5 Dec 2001 18:09:51 -0000 Received: from unknown (HELO junk.nocrew.org) (212.73.17.42) by sources.redhat.com with SMTP; 5 Dec 2001 18:09:51 -0000 Received: from lars by junk.nocrew.org with local (Exim 3.31 #1 (Debian)) id 16BgU3-0002MT-00; Wed, 05 Dec 2001 19:09:27 +0100 To: Richard.Earnshaw@arm.com Cc: Andrew Cagney , twall@oculustech.com, gdb@sources.redhat.com Subject: Re: packing/unpacking 4-octet longs References: <200112051645.QAA06737@cam-mail2.cambridge.arm.com> From: Lars Brinkhoff Organization: nocrew Date: Wed, 05 Dec 2001 10:11:00 -0000 In-Reply-To: <200112051645.QAA06737@cam-mail2.cambridge.arm.com> Message-ID: <854rn5fsix.fsf@junk.nocrew.org> User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2001-12/txt/msg00039.txt.bz2 Richard Earnshaw writes: > > > 0xaabbccdd is stored as 0xbb 0xaa 0xdd 0xcc. > > I'm pretty sure that there is another very old wacko architecture > > that did something similar to this, I'm trying to remember which. > > pdp11? > PDP11, I think. Yes. That ordering is sometimes called "PDP-endian" (incorrectly in my opinion, since there are many different PDP architectures). > It's a bit before my time, but IIRC it's because earlier PDPS (8? > 9?) were 16-bit machines, so there wasn't really any concept of > word-ordering beyond that: 16-bit words were little-endian, but the > most significant word was always at the lowest address (or the other > way around). Not quite. All earlier PDP architectures were word-adressable. PDP-1 and PDP-4/7/9 had 18-bit words, PDP-5/8 had 12-bit words, and PDP-6/10 had 36-bit words. I don't know if the other machines had multiple-word operands, but the PDP-6/10 stored the most significant word first. PDP-11 was the first 16-bit machine, and the first byte-addressable. -- Lars Brinkhoff http://lars.nocrew.org/ Linux, GCC, PDP-10 Brinkhoff Consulting http://www.brinkhoff.se/ programming