Uploaded December 2012 | Updated November 2026, 4 hours ago
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, in the following tutorial we look at how to link a native GAS AT&T syntax object file.
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++.
I hope this helps. I've not explained very much in this tutorial but hopefully we can get to that later.
FaceBook:
facebook.com/pages/WhatsaCreel/167732956665435
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, in the following tutorial we look at how to link a native GAS AT&T syntax object file.
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++.
I hope this helps. I've not explained very much in this tutorial but hopefully we can get to that later.
FaceBook:
facebook.com/pages/WhatsaCreel/167732956665435










