converting c/c++ code to assembly

This is a discussion on converting c/c++ code to assembly within the A Brief History of Cprogramming.com forums, part of the Community Boards category; can we convert c/c++ code to assembly code?...

  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
    ggs
    ggs is offline
    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,386
    >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,789
    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,136
    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,831
    >>> 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,136
    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, 02: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, 03:46 PM
  4. << !! Posting Code? Read this First !! >>
    By biosx in forum C++ Programming
    Replies: 1
    Last Post: 03-20-2002, 12:51 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21