Simply, why does not call 12345678
jump to 12345678
address?
Why do I have to use the instruction like this
mov eax, 12345678
call eax
More importantly, what does call 12345678
exactly do?
Reverse Engineering Stack Exchange is a question and answer site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation. It only takes a minute to sign up.
Sign up to join this communityBecause of call binary encoding. See the details and properties for intel processors at
Intel manual at page 3-114 Vol. 2A for Intel architecture. If you are talking about different processor, please state which exactly.
CLI
instruction documentation, however just a few pages back (3-96 Vol. 2A; Page 575-580) contains a complete treatment of CALL
behavior.
call 12345678
pushes the following instruction's return address onto the stack and then jumps to 12345678
.
It is functionally equivalent to:
mov eax, 12345678
call eax
(Though the code above has the side-effect of modifying eax
, whereas a simple call 12345678
does not modify eax
.)