July 11, 2008
Jarrett Billingsley Wrote:

> I get the impression that people who think that "word == 2 bytes" tend to be long-time Windows programmers.  Since that's, well, pretty much the only place where that's true.

As one of those long time Windows programmers, I know a "WORD == 2 bytes" only because that's how WORD is defined in the Windows SDK headers. I also know it is half the size of a DWORD (i.e. double word).

As to how the question of how many bytes there
are in a "word", I wouldn't have a clue ;)

July 14, 2008
On 2008-07-10 22:24:00 -0500, Markus Koskimies <markus@reaaliaika.net> said:

> On Thu, 10 Jul 2008 19:55:35 -0400, Nick Sabalausky wrote:
> 
>> "Markus Koskimies" <markus@reaaliaika.net> wrote in message
>> news:g55see$1h9i$15@digitalmars.com...
>>> On Thu, 10 Jul 2008 14:57:54 -0400, Jarrett Billingsley wrote:
>>> 
>>> - byte, word, dword; these are well defined due to historical reasons.
>>> Change them and you confuse lots of people.
>>> 
>>> 
>> A "word" is well-defined to be the native data size of a given chip
>> (memory, cpu, etc). People who have done a lot of PC programming tend to
>> forget that or be unaware of it and end up with the mistaken inpression
>> that it's well-defined to be "two bytes", which has never been true in
>> the general-case.
> 
> Hmmh, I disagree. "word" might mean in the history the width of the
> processor data paths, but nowadays it is 16-bit unsigned even in
> microcontrollers and DPSs (although DSPs rarely follow fixed width of
> processor words, e.g. having 20-bit data path, 24/48-bit special
> registers and accessing memory with 16-bit granularity).

I normally just stalk this list, but I had to jump in here. The PowerPC is one of the most widely-used processors in embedded systems (and has seen not insignificant usage in the desktop world as well), and all IBM/Motorola documentation refers to a "word" as 32 bits, and a "half-word" as 16 bits. Both of these definitions apply to both the 32-bit and 64-bit PowerPC implementations. As an example, one of the assembly mnemonics for loading a 32-bit value from memory is "lwz" (load word and zero).

1 2
Next ›   Last »