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?
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?
you shouldn't "ret 18h", you should just "ret". Since you're doing a PROC, masm will write the correct form of "ret xx".
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 ;)
MyFunc PROC 1a:DWORD, 2b:DWORD
push [2a]
push [1a]
call
ret
MyFunc ENDP
perhaps ;)
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.