Mixing in Assembly Language
One of the easiest ways to build in Assembler is to build in C, because C allows you to write in Assembler using an _asm directive. This directive tells the compiler that it's about to see Assembler, so it doesn't do anything with your code. The reason for this is that the C compiler's natural output is Assembler; this is then assembled, during the last pass of the compiler, into machine code. Most C compilers work like this, so it's very easy for any C compiler to support the inclusion of Assembler. The really great thing about doing your Assembler work in C is that you can provide all the boilerplate code using straight C (which saves you from having to fathom and then write all the necessary prologue and epilogue code for the call and parameter resolution stuff). You can then tell the compiler to generate Assembler from C. This process allows you to rough out the bare bones in C and then fine tune the code in the Assembler generated by the compiler. It's also a great way to learn about Assembler programming.