Theese are some snippets from my adventures in learning x86_64 assembly. Files: simple.cpp The simplest way of doing inline assembly. Compares a number from stdin only the comparison part is implemented in assembly labels.coo Similar to above, but uses named tokens instead of cryptic %0, %1 etc x87-coprocessor.c Calculates the square root of 2 and 141 using the FPU. Once using float in C and once using a double loop.cpp Another simple snippet Compilation: g++ or gcc Further messing around You can (and should) run gdb and take a look "inside" You may want to read /blog/ddd/ (which covers some gdb commands as well) Start with gdb a.out you will see a prompt: (gdb) Some useful commands in this case "run