Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PC assembler fun.



Hi guys,
Is anyone a PC x86 assembler expert out there, as I have convert this code

shr eax, 1
rcl edx, 1

To this in C

register int Carry;
register int eax;
register int ebx;
register int edx=0;

.. other code

Carry = (eax & 1);
eax >>=1; // shr eax, 1
edx = (edx <<1) | Carry; // rcl edx, 1


I've been looking in the Assembler Inside & Out (P.399), and the example of
a rcl instruction looks wrong to me.

Any ideas, is this right ???.

Thanks
Mark.
_______________________________________________
mac-games-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/mac-games-dev
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.