endianness and sscanf/sprintf

R

Ron Natalie

Keith Thompson said:
There have been a number of different Cray models, with different
architectures, but I think the vector systems (the oldest I've worked
on was the T90) have been fairly consistent in their data types.

I think you're quoting bit sizes rather than byte sizes. The C
compiler uses an 8-bit byte for compatibility with other systems, even
though there's no real hardware support for 8-bit operands.
sizeof(char) is 1, of course; sizeof(TYPE) is 8 (64 bits) for each of
short, int, and long.

Yes, I was talking bits. My experience was with the X/MP and then
the Y-MP EL processors. I actually bought a CRAY 2 in one job, but
I was gone by the time it was delivered.
 
G

Gary Labowitz

Ron Natalie said:
[snip]
The IBM 7094 came out in January 1963 and was the last of its ilk from
IBM. Its follow on was the S/360 in 1964. I never came across a "partial
word".
The 16-bit values were referred to as "halfword" and there were a variety
of operations that manipulated them. Loading a halfword into a register got
you sign extension, for example. AFAIK the term "partial word" was never
used.
 
L

Lew Pitcher

pete said:
Lew said:
Martijn Lievaart wrote:
[snip]
Same with the unit words.
That means different things to different people.
The way I learned it at uni, very long time ago,
was that a word was the basic unit of storage.
Same as the definition of byte in C/C++. Along came
MicroSoft and institutionalised the word-size of
the 8086 as a WORD, so to others a word now is 16 bits.
I've seen even different uses of the word
'word', anyone got an example?

In the IBM mainframe world, a "word" (or "fullword")
has been 32bits for the
last 40+ years. A 16bit quantity is a "halfword".


I'm familiar with "word" having a similar meaning as
the traditional meaning of "int", having the
"natural size suggested by the architecture
of the execution environment"

IBM System/370 Principles of Operation (GA22-7000-4, September 1, 1975)

System Organization / Information Formats

"The system transmits information between main stroage and a CPU or
channel in units of eight bits, or a multiple of eight bits at a time.
Each eight-bit unit of information is called a /byte/, the basic building
block of all formats.
...
Bytes may be handled separately or grouped together in fields. A
/halfword/ is a group of two consecutive bytes and is the basic building
block of instructions. A /word/ is a group of four consecutive bytes; a
/doubleword/ is a group of eight bytes.


(It should be noted that the term "byte" in the above text refers to a
CPU-measured quantity, and /not/ to the terminology used by the C standard.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top