DimitriDaSilva / 42_libasm

The aim of this project is to get familiar with Assembly language, more specifically, 64 bits ASM, Intel syntax compiled with nasm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

42_libasm

The aim of this project is to get familiar with Assembly language, more specifically, 64 bits ASM, Intel syntax compiled with nasm.

Resources

Assembly is tricky to learn, in part, because there are several flavours (AT&T or Intel / 32bit or 64bit / Linux or Mac). So when checking out Assembly resources to complete the libasm project keep in mind a few things:

  • The calling convention sets a few rules:
    • rdi - used to pass 1st argument to functions
    • rsi - used to pass 2nd argument to functions
    • rdx - used to pass 3rd argument to functions
    • rcx - used to pass 4th argument to functions
    • r8 - used to pass 5th argument to functions
    • r9 - used to pass 6th argument to functions
    • rax - used to define the return value of functions
  • For syscalls:
    • The number of the syscall has to be passed in register rax
    • To execute a syscall, just use the syscall instruction without arguments
    • The kernel destroys registers rcx and r11

About

The aim of this project is to get familiar with Assembly language, more specifically, 64 bits ASM, Intel syntax compiled with nasm


Languages

Language:C 49.7%Language:Assembly 42.3%Language:Makefile 8.0%