News:

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

should i ENTER ?

Started by sw337, September 13, 2006, 10:59:04 AM

Previous topic - Next topic

sw337

 :eek

Please tell me if should use ENTER instruction every where or the
expanded version i.e. push ebp mov   ebp, esp  sub esp, 4
is better ?

Thanks.

gabor

Hello!

What different would it make to use the "expanded version"?
Would it be faster? Well, maybe. This could be checked by a simple test app.

ASFAIK masm is not using the ENTER instruction, it uses the equivalent set of instructions instead.
If you use masm's invoke method you don't have to bother with entering a procedure and creating the local stack.

Greets, Gábor

raymond

Quote from: gabor on September 13, 2006, 03:20:46 PM
If you use masm's invoke method you don't have to bother with entering a procedure and creating the local stack.

MASM's invoke is a "macro" strictly designed to push the given parameters on the stack and issuing the "call" to a procedure. It has NOTHING to do with any of the called procedures themselves.
When you assume something, you risk being wrong half the time
http://www.ray.masmcode.com

gabor

Hi!

That's right what raymond wrote, I made a mistake. About local variables there is the LOCAL keyword. The point I wanted to tell was that according to my experiences masm's possibilities make local variables to handle with ease.

Greets, Gábor