This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: packing/unpacking 4-octet longs


Richard Earnshaw <rearnsha@arm.com> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]