Compiling Assembly, Integrating with C

Compiling assembly with C is actually pretty easy, you can even get pre-processor commands into your assembly so you can re-use constants between the two.

Using the proper Assembler on Mac OSX

The standard compiler gcc for Mac OSX is actually the clang compiler, this means that you need to use its assembler and linker as well. If you try to do the compilation in steps, you will notice that "as" is not the clang assembler however, which causes it to break down.

In this article I will discuss a simple solution to this problem.