A few string manipulation functions and libc system call wrappers written in x86_64 Assembly with the Intel syntax
1- Install dependencies
sudo apt install -y nasm
2- Clone this repository
git clone https://github.com/Kuninoto/42_libasm
3- Navigate to libasm/
, assemble and wipe the artifact files
cd 42_libasm/libasm && make && make clean
4- Compile your program with your new libasm
Example (with C): cc -Wall -Wextra -Werror main.c libasm.a
make
or make all
- Makes libasm.a
make clean
- Deletes all the resulting object files
make fclean
- Deletes libasm.a
and all the resulting object files
make re
- Deletes everything (object files and libasm.a
) and rebuilds libasm.a
- Add their prototypes to
libasm.h
- Add their source files to
libasm/
- Add their source file names to the
GENERAL
variable inside the Makefile - Rebuild the library with
make re
You Can Learn Assembly in 10 Minutes (it’s easy)
How do I know what registers function parameters will be mapped on?
syscalls(2) man page
Linux System Call Table for x86_64
x64 ASM Cheat Sheet
NASM tutorial
How does push and pop work in assembly
CPU Registers x86
Godbolt
Made by Nuno Carvalho (Kuninoto) | [email protected]