Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Register Macro as Prologue or Epilogue
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Syntax:   OPTION PROLOGUE:macroname
 
            OPTION EPILOGUE:macroname
 
  See also: PROC, MACRO, RET Instruction, IRET Instruction,
            Using VARARG in Macros
 
  Description:
 
     PROLOGUE registers <macroname> as the macro function to be called
     when a prologue needs to be generated. EPILOGUE registers
     <macroname> as the macro procedure to be called when a RET or IRET
     instruction is encountered.
 
     You can revert to the default prologue or epilogue by specifying
     PrologueDef or EpilogueDef as <macroname>. EPILOGUE code is
     generated only if the RET or IRET instruction terminating the PROC
     block has no operand. The RETN, RETF, and IRETF instructions do not
     cause the assembler to generate epilogue code.
 
     To suppress generation of the prologue or epilogue code, give NONE
     as the <macroname>.
 
     The assembler expects a macro definition of this form:
 
     macroname MACRO procname, flags, argbytes, localbytes, <reglist>,
                     userparms:VARARG
 
     Parameter      Description
 
     procname       Macro name for the procedure or NONE.
 
     flags          Word-size bit flag: (1=On, 0=Off)
                    Bits    Description
                    0-2     Language type:
                              000     Not specified
                              001     C
                              010     SYSCALL
                              011     STDCALL
                              100     Pascal
                              101     Fortran
                              110     Basic
                              111     Reserved
                    3       Reserved
                    4       Caller restores stack
                    5       FAR procedure
                    6       PRIVATE procedure
                    7       EXPORT procedure
                    8       Epilogue caused by IRET instruction
 
                    All other bits are reserved for future use.
 
     argbytes       The total number of bytes used by PROC arguments.
 
     localbytes     The total number of bytes used by variables defined
                    with the LOCAL directive inside the PROC block.
 
     reglist        Comma-delimited list of registers from the PROC
                    directive USE option. This list is reversed in
                    in the EPILOGUE directive. Angle brackets are
                    passed.
 
     userparms      Passed the optional macroarglist from the PROC
                    directive.
                                    -♦-