Then write a linker. Better yet, save yourself the trouble and learn to use an existing one.
Then write a parser and a lexer. Learn to make them work together. (Look into flex and bison: The LEX & YACC Page )
Then, use the parser and lexer to interpret the source code, write a compiler to compile their output into assembly, run it through the assembler to generate your object code, and then run it through the linker to link any libraries or other dependencies.
Compiler writing is not simple. Learn to use compilers first (gcc is a good one to use for this; Visual <whatever> hides too much of what's going on for you to get a grasp of the actual usage).
Two points, one I never said writing a compiler was easy (I said writing a disassembler was easy), two, you've never mentioned a compiler before - do you mean an assembler? (a compiler is a high level language, not assembler).
Read through the code and it should become fairly clear, see which commands have which command type.