Hi everybody,
I'm making several program test and I found that the .IF .ELSE .ENDIF macros don't work properly.
Has anybody the implementation of new macros to work on 64 bits?
Maybe somebody has a link to know how to implement it ?
Thanks in advance,
GUAN
Emulating these constructs using macros is not easy. I remember that someone posted macros which simulates these directives some months ago on this board, try to search it.
The unique macros that I found here it is within the file x64calling.inc where we have the macros: INOVOKE, "LOCAL", ... the new way of declaration functions to use with the new macros but nothing about .IF, .BREAK.WHILE, ...
GUAN
See this:
http://www.masm32.com/board/index.php?topic=5654.0
Thanks MazeGen,
I was waiting for a solution like as MASM32 but this solution is good too, now my code is readable xD
GUAN
function WndProc,hWin:QWORD,uMsg:DWORD,wParam:QWORD,lParam:QWORD
xor rax,rax
mov eax,uMsg
@IF <<cmp eax,WM_INITDIALOG>>, EQUAL?
push hWin
pop hWnd
@ELSEIF <<cmp eax,WM_COMMAND>>,EQUAL?
mov rax,wParam
@IF <<cmp ax,IDM_FILE_EXIT>>,EQUAL?
invoke SendMessage,hWin,WM_CLOSE,0,0
@ELSEIF <<cmp ax,IDM_HELP_ABOUT>>,EQUAL?
invoke ShellAbout,hWin,addr AppName,addr AboutMsg,NULL
@ENDIF
@ELSEIF <<cmp eax,WM_CLOSE>>,EQUAL?
invoke DestroyWindow,hWin
@ELSEIF <<cmp eax,WM_DESTROY>>,EQUAL?
invoke PostQuitMessage,NULL
@ELSE
invoke DefWindowProc,hWin,uMsg,wParam,lParam
return rax
@ENDIF
return FALSE
endf
ret