"Gordon Burditt" <go***********@burditt.orgwrote in message
news:13*************@corp.supernews.com...
>>>I have been thinking that all pointers(to any obejct) have the same
size. The size of a pointer is the size of an Int. This is beause a
memory location is addressed by an Int. Is that right/wrong?
both of these are architecture dependent.
however, as it so happens, both are true for 32 bit x86 (except in certain
edge cases, such as an x86-based AS/400, ...).
It isn't true for Large Model 32-bit x86, where pointers are 48 bits.
That isn't used much, though.
yes, but then again, I will regard this as an edge case...
in my case, I was generally excluding edge cases.
>>only the former is true for x86-64 (where int remains 32 bits, but
pointers
are 64 bits).
MS-DOS on x86 used 16-bit configurations where int is 16 bit, data
pointers were 16 bit or 32 bit, and code pointers were 16 bit or
32 bit, in 4 possible combinations.
yes.
maybe I should have further specified that by x86 I meant:
x86 in 32 bit flat-model protected mode.
anymore, development of real-mode, big-real, or segmented 16/32-bit
protected-mode apps is fairly rare...
likewise, people, will usually state that they are developing specifically
for DOS or RM (or sometimes, i86), rather than using the more general term
of x86.
this is even more the case for '32 bit x86', which can be assumed to exclude
these other options.
x86-64, well, implies an x86-64 processor operating in long mode (if not in
long mode, I will still regard it as x86, as is also the case for legacy
mode).
or such...