P
Paul
Its not a spurious link , it is a link that gives a general definition of aLeigh Johnston said:No the example uses segment offset addressing as an example. You are[snip]
It is an integer constant representing an offset to be applied
to a
stack frame pointer; it is NOT a pointer for any definition of
"pointer"; it is like saying 'foo' below is a C++ pointer
because we
add it to a C++ pointer:
const std::size_t foo = 42;
int *p = ...;
int *p2 = p + foo; // is foo a pointer? don't be stupid.
No incorrect , you said it was not a pointer in assembly
language.
Ovbioustly its not a C++ pointer, its an array type object.
Do you not understand the meaning of the words "it is like"? Do
you
know what an "analogy" is? Have you ever bothered to try "lateral
thinking"?
I never said it was a C++ pointer; I was giving you a C++
analogy of
why a pointer offset (for any definition of "pointer") is not a
pointer.
But a pointer in assembly is not the same as a pointer in C++. A
pointer
in C++ is a pointer type object, or an object of pointer type.
Assembly does not have types, a pointer in assembly is the same
as any
other variable or constant, except that its intended use is to
store an
address(or an offset) to another memory location.
I gave you an analogy; you obviously do not understand analogies. An
analogy explains one thing by comparing it to something else and
these
two things are *similar* in some respect not the *same*.
You cannot compare an elephants ability to lift objects with its
trunk
to that of an ant, because an ant doesn't have a trunk.
Likewise you cannot compare a C++ type, to an assembler variable or
constant because assembler doesn't have types.
You still do not understand what an analogy is. Fail.
Get a clue.
A pointer in assembly is anything that is being used to store an
address and a constant being used as a stack frame pointer offset is
not something which is being used to store an address; such a
constant
is only being used to emit machine code in the text segment.
No you are wrong a pointer is assembly does not necessarily store a
real
address, a variable that stores an offset or an index is also
considered
a pointer in assembly language.
No it isn't; see Ian Collins' reply which agrees with what I have been
saying with much clarity.
I refer you to section 5.5 Pointer data types in the following link:
http://www.oopweb.com/Assembly/Documents/ArtOfAssembly/Volume/Chapter_5/CH05-1.html#HEADING1-197
Again you are confusing two different terms with the same name: an
Intel x86 segment offset is not the same as an offset used in
conjunction with a pointer (or address).
I never even mentioned segment offsets. You are the one who seems
confused.
The link you posted talks about x86 segment offsets so obviously one
can only conclude that that is what you are referring to when you
erroneously say an offset can be a pointer. Get a f**king clue. In x86
a segment offset can be considered a pointer as it forms part of a
logical address but we are not talking about segment offsets; we are
talking about offsets applied to already formed logical addresses.
confusing the term "offset" with this seg:ffset addressing syntax.
You are the one posting spurious links to irrelevent details of x86
assembly language programming; you are the one trying to force equivalence
between the different terms "offset" and "pointer".
pointer in assembly language.
No; an "offset" is added to an address to create another address.
An address is an integer.
The link didn't imply my interpretation of anything. It's a link that givesSo why post a link which implies that that was *your* interpretation?
a general definiton of a pointer in assembly.
..
You are the one bringing irrelevances into what you laughingly call a
"debate".
A label being the name of a constant used as an offset applied to the
stack frame pointer IS NOT A POINTER; it is an offset; an offset *applied*
to a pointer.
Yes it is.
A pointer is something that points to another location.
_arr$ has the value -12 , so it points -12 bytes into the stack frame.
ebp is the stack base pointer and it's a hardware register that stores the
addrress of the stack frame. When _arr$ is added to ebp, _arr$ is being used
as a pointer, relative to the stack base.
Obviously you think a pointer is an object that resembles a C++ pointer and
must be a memory location that stores a memory address or soemthing, so you
disagree.
That's your opinion on what a pointer is an your welcome to it. I disagree
so stop spamming nonsense.
Get a f**king clue.
And abuse.
A pointer is something that points to a location, whether it's relative orOne can simulate a pointer to an array element using array indices
(offsets) but this is a purely a simulation; it is not a true pointer.
direct.
You can go simulate something that points to something if you like.
GL.