Sorry, I don't get the question. \:
I've read over this several times but I don't get what you're asking.
Alright well I've looked around and I can't get a good definition of a pointer for some reason. I've seen that a pointer gets it's space allocated at runtime. Is that true? For example, if I have
then lpText doesn't get it's size until I run my program that will push lpText onto the stack for my MessageBoxA correct? Thanks a lot, really need that cleared up.Code:lpText equ offset text ;set a pointer to the offset (location) text .data text db "Pointers are fun!", 0
Last edited by Shark23; 11-11-2010 at 03:29 PM.
Assembly Programmer
Sorry, I don't get the question. \:
I've read over this several times but I don't get what you're asking.
Why do you need to have 2 variables defined for the same string?
A pointer is just like the name suggests. It points to a defined memory location, in this case the string in the .data section. A pointer does "not" have a size (depends on how you look at it, the address itself is in 32-bit programs a DWORD, it does not relate to the size of data it might point).
You could just do it like this:
Idk if it made any sense, like Void, I don't really understand your question .Code:.data lpText db "Pointers are fun!", 0 .code ... push 10h push 0 push offset lpText push 0 call MessageBox ...
Last edited by HellSpider; 11-12-2010 at 02:54 PM.
Shark23 (11-12-2010)
My wording was crap there, sorry. HellSpider, that was pretty helpful. I got my problem solved anyway.
Assembly Programmer