NO

Author Topic: Macros for quick procedure definition  (Read 3082 times)

Online Vortex

  • Member
  • *
  • Posts: 871
    • http://www.vortex.masmcode.com
Macros for quick procedure definition
« on: March 18, 2024, 07:54:20 PM »
Hello,

Here are some macros for quick procedure definition. The PROCX macro sets automatically the PARMAREA value :

Code: [Select]
PROCX MACRO functionname:REQ,args:VARARG

fname TEXTEQU functionname

    functionname PROC args PARMAREA=16*QWORD

ENDM

ENDPX MACRO

    fname ENDP

ENDM

The maximum number of parameters which is 16 by default can be modified easily.

An example :

Code: [Select]
PROCX start

LOCAL hModule:QWORD

    invoke  GetModuleHandle,NULL
    mov     hModule,rax
    invoke  DialogBoxParam,hModule,\
            ADDR Resource,NULL,ADDR DlgProc,NULL
    invoke  ExitProcess,rax

ENDPX
Code it... That's all...