Sunday, July 12, 2009

How can I convert my C code to assembly language?

I have written some C code , but i want it to be converted to assembly language or if not that than atleast in form of neumonics .


i mean either i want it in assembly instructions like MOV,JMP


or in code like 09 25.........





is ther any software for that?

How can I convert my C code to assembly language?
when you compile the program in C it will generate the Object file that contain the assembly code. no nead of transfering the code into assembly code.





else an editor software is there XEDITOR you can opem the exe file of C program then you will get the assembly code like


JMP,MOV,CMP
Reply:If you compile it, then it's in executable code, which is like the "code" you're talking about.... they're opcodes and parameters.... which then can be disassembled to assembly if you want.
Reply:your compiler has a special option of directly generating assembly language. how to do that depends on the compiler you have
Reply:you can use gcc to compile your c code to an object file. then use objdump (with the option -D) to convert the object file to disassembly.





you can get gcc from http://gcc.gnu.org/install/binaries.html


No comments:

Post a Comment