On 2024-08-15 11:00 a.m., Paul Koning via cctalk wrote:
The short answer is "it's historic and manufacturers have done it in different
ways".
You might read the original paper on the topic, "On holy wars and a plea for
peace" by Danny Cohen (IEN-137, 1 april 1980):
https://www.rfc-editor.org/ien/ien137.txt
Not reading the paper, I would say it is more the case having short data
types (little) and FORTRAN packing 4 characters in word (big).
I don't know about the VAX,but my gripe is the x86 and the 68000 don't
automaticaly promote smaller data types to larger ones. What little
programming I have done was in C never cared about that detail.
Now I can see way it is hard to generate good code in C when all the
CPU's are brain dead in that aspect.
char *foo, long bar;
... foobar = *foo + bar
is r1 = foo
r3 = * r1
r2 = bar
sex byte r3
sex word r3
r4 = r3 + r2
foobar = r3
what I want is
bar = * foo + bar
nice easy coding.
And yes, different computers have used different ordering, not just
characters-in-word ordering but bit position numbering. For example, very
confusingly there are computers where the conventional numbering has the lowest
bit number (0 or 1) assigned to the most significant bit. The more common
numbering of 0 for the LSB gives the property that setting bit n in a word
produces the value 2^n, which is more convenient than, say, 2^(59-n).
Real computers are 2^36 from the 50's.
Big iron is the 60's. :)
paul