Walter Bright wrote:
Vladimir A. Reznichenko wrote:So the question is why the call instruction drops register values?The call instruction doesn't drop anything, it just does a call. What is happening is the rotateLeft function is using ECX for something else. The EAX, ECX, and EDX registers are (by convention) not preserved across function calls.
AIUI, that would not cause an access violation, it would only cause the returned value to be wrong. My question would be: does the rotateLeft function pop its arguments from the stack? If it doesn't, then "pop EDX" will actually put "sh" into EDX instead of the address of "a"...
Jerome
--
mailto:[email protected]
http://jeberger.free.fr
Jabber: [email protected]
signature.asc
Description: OpenPGP digital signature
