Generating Assembly From C
It is possible to generate assembly code directly from c code.
From the terminal you can generate assembly code with -
gcc -S main.c -o main.asm
If you add the flag -fverbose-asm
it will add some (possibly) useful comments.
gcc -S fverbose-asm main.c -o main.asm
The assembly code won’t be elegant, it will be very long winded, but it will work.
- Previous
- Next