Mechanics of mixed language programming

Step 1

Compile C program to produce object file: gcc   -c    test.c

Step 2

Assemble assembly program to produce corresponding object file: nasm -f   coff   Diff.asm

Step 3

Link both object files together to produce executable: ld  test.o  Diff.o  -Tlink.cmd   -u   start