Procedure declarations through macros

Started by Vortex, May 01, 2025, 07:10:56 PM

Previous topic - Next topic

Vortex

Hello,

I am intending to work on a macro handling procedure definitions to store rcx,rdx,r8 and r9 in the shadow space.

For the the moment, the macro is very simple :

xPROC MACRO var

var

ENDM

Testing the macro, I receive the following error messages :

xPROC <DlgProc PROC hWnd:QWORD,uMsg:QWORD,wParam:QWORD,lParam:QWORD PARMAREA=12*SIZEOF QWORD>\PellesC\bin\poasm /AAMD64 ColorDlg.asm
ColorDlg.asm(33): error: Invalid use of '< >'.
ColorDlg.asm(35): error: Invalid use of 'LOCAL'.
ColorDlg.asm(35): fatal error: Invalid use of '_hWnd'.

Tested with Poasm Version 13.00.49
Code it... That's all...

Vortex

Hello,

Testing this code :

xPROC MACRO func,var

func PROC var

ENDM

xPROC DlgProc,<hWnd:QWORD,uMsg:QWORD,wParam:QWORD,lParam:QWORD PARMAREA=12*SIZEOF QWORD>

LOCAL _hWnd:QWORD

    mov _hWnd,rcx

The output is :
\PellesC\bin\poasm /AAMD64 ColorDlg.asm
ColorDlg.asm(5): error: Redefinition of symbol 'DlgProc'.
ColorDlg.asm(35): error: Invalid use of 'LOCAL'.
ColorDlg.asm(35): fatal error: Invalid use of '_hWnd'.
Code it... That's all...

Vortex

Hello,

I think we care ignore the case of macros declarating procedures. There is a workaround.
Code it... That's all...