I have a library routine for nullifying procedure frames nested or otherwise, but depend on ENTER rather than the conventional
push ebp
mov ebp, esp
add esp, -40
Can MASM be coerced into using ENTER?
If you are asking for a way to force MASM to use ENTER automatically, you should be able to modify an existing prologue macro to use ENTER, and then use that one in place of the default.
OPTION PROLOGUE:macroname
; code that uses new prologue here
OPTION PROLOGUE:PrologueDef
; back to using the default prologue
Zooba posted a stack probing prologue macro here (http://www.masm32.com/board/index.php?topic=5252.0), based on a similar macro by chep here (http://www.masm32.com/board/index.php?topic=2011.0). For the details, see User-Defined Prologue and Epilog Code, in Chapter 7 of the MASM Programmer’s Guide, available here (http://webster.cs.ucr.edu/Page_TechDocs/MASMDoc/ProgrammersGuide/Chap_07.htm).
I have also posted very basic macros for both prologue and epilogue on the OPTION (http://msdn2.microsoft.com/en-us/library/4zc781yh(VS.80).aspx) page at MSDN. They are probably an easier starting point than the stack probing version.
Cheers,
Zooba :U
:thumbu Excellent.
I guess it's time I studied the full potential of macros. NASM has been my mainstay and it's macro capabilities are not as extensive. For that reason I have developed the habit of coding in what is commonly termed pure assembly.
Thanks for the input, very valuable links and info
Quote from: Tight_Coder_Ex on November 28, 2007, 12:27:31 PM
NASM has been my mainstay and it's macro capabilities are not as extensive.
I would have to disagree there - you can do a lot more with nasm's macro capabilities. Although pre-canned utility is not supplied by default, so you generally have to write your own; that said there are a number of packages available, so you don't even need to do that.
Tight_Coder_Ex,
Nasm V2.00 is newly released :
http://nasm.sourceforge.net