Hi.
I wrote following code and got a wrong result:
proc tep x
invoke wsprintf,buf,fmt,[x] ; x equ ebp+10h, but [ebp+10h] is undefined!
ret
endp
So, I see the two ways to correct it: manually filling stack parameters area from registers or fix
proc macro to implement copying parameters to the stack, e.g.
proc tep x
; prologue begin
push rbp
mov rbp,rsp
mov [x],rcx ; real copy parameters
virtual at rcx ; or just aliasing it
x dq ?
end virtual
; prologue end
invoke wsprintf,buf,fmt,[x] ; well, [x] is correct
ret
endp
It would be better, if real copying block can be optional, for optimization purposes.