Dynamic arrays, basic type names, auto

Justin Spahr-Summers Justin.SpahrSummers at gmail.com
Sun Jul 13 18:52:48 PDT 2008


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

> On Thu, 10 Jul 2008 19:55:35 -0400, Nick Sabalausky wrote:
> 
>> "Markus Koskimies" <markus at reaaliaika.net> wrote in message
>> news:g55see$1h9i$15 at 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).




More information about the Digitalmars-d mailing list