Simple example to demonstrate assembly on Linux x86_64.
- how define macros
- calling external functions (libc and libm in this case)
- IP relative addressing
- SSE for floating point operations
- .rodata (instead of .data) for constants
- shared libraries
- syscall
- CMake to drive NASM compilation
cd asm_nasm && cmake -S . -B build && cmake --build build
or by using "presets" (sets Ninja as build system)
cd asm_nasm && cmake --preset default && cmake --build build