Skip to content

stephan-cr/asm_nasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple example to demonstrate assembly on Linux x86_64.

Key points

  • 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

Building

Prerequisites

Build

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

About

Demonstrate assembly on Linux x86_64 (intel syntax) System V ABI

Topics

Resources

Stars

Watchers

Forks