x86-64 Assembly Cheatsheet
Data Transfer Instructions
mov (Move)
mov (Move)mov rax, 10 ; Store 10 in register RAX
mov rbx, rax ; Copy the value of RAX into RBX
mov rcx, [var] ; Load value from memory address "var" into RCXlea (Load Effective Address)
lea (Load Effective Address)lea rax, [var] ; Load the memory address of "var" into RAXArithmetic Instructions
inc (Increment)
inc (Increment)dec (Decrement)
dec (Decrement)add (Addition)
add (Addition)sub (Subtraction)
sub (Subtraction)Logical Instructions
and (Bitwise AND)
and (Bitwise AND)or (Bitwise OR)
or (Bitwise OR)xor (Bitwise XOR)
xor (Bitwise XOR)not (Bitwise NOT)
not (Bitwise NOT) Comparison Instructions
cmp (Compare)
cmp (Compare)test (Bitwise Test)
test (Bitwise Test)Branch (Jump) Instructions
jmp (Jump)
jmp (Jump)Conditional Jumps (je, jg, etc.)
je, jg, etc.)Stack Instructions
push (Push onto Stack)
push (Push onto Stack)pop (Pop from Stack)
pop (Pop from Stack)Procedure Instructions
call (Function Call)
call (Function Call)ret (Return from Function)
ret (Return from Function)leave (Cleanup for Stack Frames)
leave (Cleanup for Stack Frames)System Call Instruction
syscall (System Call)
syscall (System Call)Last updated