c++cassemblygccx86-16

Convert C/C++ to 8086/88 Assembly


Is there any way to convert C/C++ to Assembly not to HEX.

Not like something that gcc or other compiler done(C/C++ --> ASM --> HEX).

Only Convert It to ASM.

Is there any way to do it by gcc,I mean stop compiler when translate C/C++ to ASM?

with special thanks for your attention,and so sorry for my basic question


Solution

  • Use the -S option of gcc, for example:

    gcc -S hello.c
    

    This will give you a file hello.s with assembly instructions.