EteimZ / x86_asm

My introduction to the x86-64 architecture

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

x86_asm

This repo contains guides and resources I am using to learn x86 assembly 64 bit.

Registers

x86 has registers which are used to store values and addresses. They come in various sizes: 64 bits, 32 bits, 16 bits. My primary focus is the 64 bit registers.

General purpose registers

  • rax
  • rbx
  • rcx
  • rdx
  • rsi

Special purpose registers

  • rbp: This register stores the base pointer in the stack.
  • rsp: This register stores the stack pointer. It represents the top of the stack.
  • rip: This register stores the current working address.

Istruction set

  • mov: Moves values to a register. mov rax, 0x2
  • add: Performs addition. add arg1, arg2 == arg1 = arg1 + arg2
  • sub: Performs subtraction. sub arg1, arg2 == arg1 = arg1 - arg2
  • push: Decrements the stack pointer and add a value to the stack.
  • pop: Increments the stack pointer and removes a value and adds it to a register.
  • lea: Load effective address. Adds an address to a register.
  • cmp: Compare its arguments and sets a flag.
  • jmp: Jump to a particular address.
  • je: Jump if equal to.
  • jne: Jump not equal to.
  • jg: JUmp if greater than.
  • call: Call a function.
  • ret
  • leave

Tools for reverse engineering

  • strings
  • objdump
  • radare2
  • gdb
  • l/strace
  • hexdump

References

About

My introduction to the x86-64 architecture


Languages

Language:Assembly 91.1%Language:C 4.8%Language:Makefile 4.1%