Post

X86-64 Assembly Instruction Reference

This document provides a quick reference guide for commonly used X86-64 assembly instructions. It serves as a handy resource for novice programmers learning assembly language.

Table of contents

Data Movement Instructions

  • MOV: Move data between registers, memory locations, or immediate values.

Arithmetic and Logical Instructions

  • ADD: Perform addition operations on registers or memory locations.
  • SUB: Perform subtraction operations on registers or memory locations.
  • CMP: Compare two operands and set flags accordingly for conditional branching.
  • INC: Increment the value of a register or memory location.
  • DEC: Decrement the value of a register or memory location.
  • AND: Perform bitwise AND operations on registers or memory locations.
  • OR : Perform bitwise OR operations on registers or memory locations.
  • XOR: Perform bitwise XOR operations on registers or memory locations.

Control Transfer Instructions

  • JMP: Unconditionally jump to a specified location in the program.
  • JE/JZ: Jump if equal or zero.
  • JNE/JNZ: Jump if not equal or not zero.
  • CALL: Call a function or subroutine at a specified memory address.
  • RET: Return from a subroutine back to the calling function.

Stack Instructions

  • PUSH: Push data onto the stack.
  • POP: Pop data from the stack.

Arithmetic Instructions

  • MUL: Perform multiplication operations.
  • DIV: Perform division operations.

Bit Manipulation Instructions

  • SHL/SHR: Shift the bits of a register or memory location left or right.

This is not an exhaustive list, but it covers some of the commonly used X86-64 assembly instructions. For a more comprehensive understanding of the instruction set, refer to the official Intel or AMD documentation.

Note: Understanding assembly language requires familiarity with the underlying computer architecture. It is recommended to study the official documentation and refer to appropriate learning resources for a thorough understanding of X86-64 assembly programming.

This post is licensed under CC BY 4.0 by the author.