6 Years
Discussion Span
Last Post by mike_2000_17

Assuming you are using GCC (which usually comes with CodeBlocks), then you need to read these instructions.

You can also create assembly listings files (with .s extension) which contain a full compilable assembly code (in a human readable listing). Then, you can assemble the assembly listings file into an object file (with .o extension) and then link it to the rest of your application.

Actually creating fully functioning functions in assembly is not a simple task, even for the simplest function. The easiest, if you are looking to optimize, is to write your function in C, and then compile as $ gcc -S my_source.c -o my_source.s to generate the assembly listing for your source file, and then manually optimize the assembly code before completing the compilation into the object file.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.