We all know that ML64 was not meant for assembly programming: no invoke, no .if, nothing useful that was invented in the 21th century 8)
But there are workarounds for Real Men
TM, like
.if macros etc, so one should not totally exclude the option of using ML64.
However, one should be aware that certain nerds at Microsoft are responsible for this product, and in contrast to Habran, Johnsa and nidud, they have not outed themselves as members of this forum. So they are not reachable in case of
bugs.Nonetheless, I hope they are at least lurkers here, therefore:
Redmond, this is your thread! In case you are interested to know about your bugs, that is...
; OPT_64 1 ; sets environment variable o64
; OxPT_Assembler AsmC ; WndProc has 4 arguments in 32 bytes
; OxPT_Assembler JWasm ; WndProc has 4 arguments in 32 bytes
; OxPT_Assembler ML64 ; WndProc has 5 arguments in 40 bytes for (x64) Version 10.00.30319.01
; OxPT_Assembler ML ; WndProc has 4 arguments in 16 bytesif @Environ(o64)
DefSize equ <QWORD>
eof$ equ <end>
else
DefSize equ <DWORD> ; int, long, and pointer are 32-bit
eof$ equ <end start>
.686p
.model flat, stdcall
endif
MyProlog MACRO procname, flags, argbytes, localbytes, reglist, userparms
Local tmp$, ctArgs
ctArgs=argbytes/DefSize
tmp$ CATSTR <procname has >, %ctArgs, < arguments in >, %argbytes, < bytes>
% echo tmp$
EXITM <localbytes>
ENDM
.code
OPTION PROLOGUE:MyProlog
WndProc proc hWnd:DefSize, uMsg:DefSize, wParam:DefSize, lParam:DefSize
LOCAL var1, var2
ret
WndProc endp
start proc
start endp
.err ; see assembler messages instead of no console output
ret
eof$P.S.: Hilarious workaround for this one: Use a dummy proc with a known # of args to set a bug correction equate 8)