This is my code:

MyFunc PROC 1a:DWORD, 2b:DWORD

push [2a]
push [1a]
call

pop ebp
ret 18h

MyFunc ENDP

MASM will write a LEAVE between pop ebp and ret 18h, without the LEAVE it doesnt crash :S

What can I do?
Posted on 2004-08-16 15:06:20 by flapper
you shouldn't "ret 18h", you should just "ret". Since you're doing a PROC, masm will write the correct form of "ret xx".
Posted on 2004-08-16 15:25:40 by f0dder
and take out the pop ebp too, horrible proc that is heh

MyFunc PROC 1a:DWORD, 2b:DWORD

push [2a]
push [1a]
call

ret

MyFunc ENDP

perhaps ;)
Posted on 2004-08-16 18:11:01 by evlncrn8
But AFAIK MASM should *not* include anything if you are using RET XX. Only for RET alone MASM should generate extra code. So it this is true it is a real bug.
Posted on 2004-08-17 07:50:04 by japheth