News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

What should I put on stack?

Started by Farabi, October 29, 2010, 02:17:57 PM

Previous topic - Next topic

Antariy


clive

Note that the code is supposed to worked INLINE by the compiler. If used as designed nothing goes on the stack, and it works on the data in-place as it exists in the CALLERs frame of reference.

Convert it to a non-INLINE function and use pointers if you have to.
It could be a random act of randomness. Those happen a lot as well.

Antariy

Quote from: clive on November 02, 2010, 12:02:34 AM
Note that the code is supposed to worked INLINE by the compiler. If used as designed nothing goes on the stack, and it works on the data in-place as it exists in the CALLERs frame of reference.

Convert it to a non-INLINE function and use pointers if you have to.

Yes, that is point of my previous post (which currently contain "Nothing" word). After some thinking I decide, that explaining of this stuff would be longer than useful things which can be "extracted" from that information.

Using of pointers automatically require to convert the HLL code appropriatedly. Onan says what he wants to decrease work with HLL as much is possible. That is the reason to suggestion of references and C++ mode.



Alex

Farabi

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Antariy

Quote from: Farabi on November 02, 2010, 12:33:42 AM
Thanks alex  :U

Clive right too - when you will compile the header as C++, you are needed to remove the "inline" specifier, otherwice object file would not contain the functions at all - it just "optimize-strip" them.
So, if you have something like:

inline int ReadObject(char *st, glObject *o){


you needed remove the "inline" that:

int ReadObject(char *st, glObject *o){


i.e. - just remove that word in text-editor.

The other possible way - do not use optimizations of inlineing (/Ob0 switch of command line of the compiler). I guess, this is much more simpler thing to "remove" inlineing.



Alex