Thread: converting c/c++ code to assembly

  1. #1
    Registered User moonwalker's Avatar
    Join Date
    Jul 2002
    Posts
    282

    converting c/c++ code to assembly

    can we convert c/c++ code to assembly code?

  2. #2
    Unregistered
    Guest
    yes but it is illegal

  3. #3
    C > C++ duders ggs's Avatar
    Join Date
    Aug 2001
    Posts
    435
    no, the machine needs to read c and c++ code in its original form in order for the code gremlins to understand and execute it properly. if it were converted to assembly, all the object orientedness and structures would fall out of the bottom!
    .sect signature

  4. #4
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    >can we convert c/c++ code to assembly code?

    I don't know if you can, but maybe your compiler can. A lot of compiler are able to compile to assembly code.

  5. #5
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    There's an output setting on VC++ that produces an ASM code file when compiling.....

  6. #6
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138
    If you don't have VC++, compile into an .exe and then decompile.

  7. #7
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    >>> yes but it is illegal

    No it is not. Almost all compilers have the option to output the object code they produce. Even if they don't, the intermediate files they produce after compiling but before linking are almost certainly around somewhere, look for them.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  8. #8
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138
    It definately isn't illegal if it is your code that you are decompiling. If it's somone else's code then it is a different story.

  9. #9
    Sayeh
    Guest
    Uh, yeah. Better compilers have a little option can turn on called "dissassembly". You can also turn on symbol tables, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 04:17 PM
  2. << !! Posting Code? Read this First !! >>
    By kermi3 in forum Linux Programming
    Replies: 0
    Last Post: 10-14-2002, 01:30 PM
  3. The relationship between C++ and assembly and machine code
    By TotalBeginner in forum C++ Programming
    Replies: 5
    Last Post: 04-22-2002, 02:46 PM
  4. << !! Posting Code? Read this First !! >>
    By biosx in forum C++ Programming
    Replies: 1
    Last Post: 03-20-2002, 12:51 PM