If I use call
,
push b
push a
call address
is valid but using call
makes me confusing with address.
So I want to use push
+ret
method like this:
push b
push a
push address
ret
But this time, passing arguments looks not working properly.
How can I pass address with this method?
call address
This near call instruction does 2 things:
call address
instruction itself.EIP
register.Your replacement code only performs the latter operation.
To correct the code, push a return address manually:
push b
push a
push Back
push address
ret
Back:
This time you'll see that passing the arguments works the same.
With this alternative method it's perfectly possible to place the Back: label anywhere you like and where it makes sense!