asm trouble

"Jérôme M. Berger" jeberger at free.fr
Sat May 16 00:26:24 PDT 2009


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:jeberger at free.fr
http://jeberger.free.fr
Jabber: jeberger at jabber.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20090516/0c416a48/attachment.pgp>


More information about the Digitalmars-d mailing list