Convert the following C++ code into assembly please quickly
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Convert the following C++ code into assembly please quickly

  1. #1
    Join Date
    Apr 2013
    Posts
    6

    Convert the following C++ code into assembly please quickly

    int x, y;
    while(x > y--)
    {
    if (x>0 && y<0)
    x = y = pow(x , y);
    else if(--x > y++)
    x = x && y;
    else
    y = ( x & y)>> 3;

    }
    Last edited by manarzaid; May 1st, 2013 at 09:43 AM.

  2. #2
    Join Date
    Dec 2012
    Location
    England
    Posts
    2,462

    Re: Convert the following C++ code into assembly please quickly

    Why? What do think this c++ code is achieving? It looks fairly nonsensical. It doesn't even set initial values for x and y.
    Last edited by 2kaud; April 30th, 2013 at 01:27 PM.
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  3. #3
    Join Date
    Dec 2012
    Location
    England
    Posts
    2,462

    Re: Convert the following C++ code into assembly.

    You're already posted this. Please don't repost.
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  4. #4
    Join Date
    Sep 2000
    Location
    Indianapolis
    Posts
    6,427

    Re: Convert the following C++ code into assembly.

    Duplicate posts (aka SPAM) are being removed. Please consider this your only warning that duplicate posts are considered spam and can result in you being banned from the forum.

    Also - this sounds like homework (which most of us won't help with). Why not just stick this into your compiler and let it generate the assembler code for you? Edit: Just looked at the code. I agree with what has been said - it is junk code, so this must be homework!

    Brad! Jones
    Admin
    Last edited by Brad Jones; April 30th, 2013 at 01:50 PM.
    -----------------------------------------------
    Brad! Jones, CodeGuru.com Site Director
    Developer.com Network Director / EiC

    webmaster@codeguru.com
    (My Latest Book)


    -----------------------------------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center