I've been learning x86-64 assembly. Writing a program required actually getting the basics to work:
- Working with Intel syntax, not AT&T (most use AT&T)
- Working on a 64-bit system (most articles written for 32-bit)
- Working on Linux (thankfully fairly standard)
- Compiling with NASM (not GCC/GAS)
- Linking with LD (not GCC)
- Properly linking printf
- Remembering calling conventions
- Writing logic in assembly
- Recreating some control/looping structures
Here's the working code and makefile.