1. redirect, preprocess
gcc -E test_asm.c -o test_asm.i
2. to asm
gcc -S test_asm.i -o tset_asm.s
3. to obj
gcc -c test_asm.s -o test_asm.o
4. link
gcc test_asm.o -o test_asm
=====
fred@fred-Vostro-2420:~/myspace/sets/test$ gcc -E test_asm.c -o test_asm.i
fred@fred-Vostro-2420:~/myspace/sets/test$ gcc -S test_asm.i -o test_asm.s
fred@fred-Vostro-2420:~/myspace/sets/test$ gcc -c test_asm.s -o test_asm.o
fred@fred-Vostro-2420:~/myspace/sets/test$ gcc test_asm.o -o test_asm
fred@fred-Vostro-2420:~/myspace/sets/test$ ./test_asm
i=6, j=5
fred@fred-Vostro-2420:~/myspace/sets/test$
1) .c
fred@fred-Vostro-2420:~/myspace/sets/test$ more test_asm.c
#include<stdlib.h>
#include<stdio.h>
int swap(int *a, int *b)
{
int middle &#