This tutorial is a remake of the first Windows C++ and ASM tutorial only I'm using Ubuntu. I'm in Ubuntu 12.10 here with G++ and NASM. For a text editor I'm a big fan of the ultra minimalist Nano. We'll probably have to shift to something a little heavier weight eventually.
This tute is just a little example of how to return an integer from assembly to C++. We'll look at inline assembly first using the GNU assembler. This assembler uses AT&T syntax which might look a little odd if you're used to Intel syntax like me.
The crux of the tutorial is creating an external NASM assembly source file, assembling it to an elf object file and linking it to our executable with G++.