Skip to content

Instantly share code, notes, and snippets.

@GabriOliv
GabriOliv / syscall_table_x86.md
Created February 28, 2021 21:16
Syscall Table x86 Linux for Assembly Programming

Syscall x86 Linux ASM

Extracted from W3Challs Syscalls

# Name eax ebx ecx edx esi edi ebp Definition
0 restart_syscall 0x00 - - - - - - kernel/signal.c:2501
1 exit 0x01 int error_code - - - - - kernel/exit.c:1095
2 fork 0x02 - - - - - - arch/x86/kernel/process.c:271
3 read 0x03 unsigned int fd char *buf size_t count - - - fs/read_write.c:460
@yellowbyte
yellowbyte / compiling_asm.md
Last active April 9, 2025 14:01
how to assemble assembly with NASM assembler to 32-bit or 64-bit ELF binary with or without libc

32-bit ELF binary

how to assemble and link:

nasm -f elf32 -o <filename>.o <filename>.asm
ld -m elf_i386 -o <filename> <filename>.o

template code (hello world):

section .text
global _start