X86 Instruction Set Cheat Sheet



  1. The instruction has no ModR/M byte; the offset of the operand is coded as a word or double word (depending on address size attribute) in the instruction. No base register, index register, or scaling factor can be applied (for example, MOV (A0–A3)). P: The reg field of the ModR/M byte selects a packed quadword MMX™ technology register.
  2. CS 33 x86 Cheat Sheet Fall 2012 Example: # Call foo(1, 15) pushl $15 # Push 15 onto the stack as a 32-bit integer pushl $1 # Push 1 onto the stack as a 32-bit integer call foo # Push return address and jump to label foo addl $8,%esp # Pop arguments off of the stack If the function has a return value, it will be stored in%eax after the function call. 4.4.2 Writing a function An x86 program uses a region of memory called the stack to support function calls.

The cheat sheet is intended for 32-bit Windows programming with FASM. Spotify for windows free download. One A4 page contains almost all general-purpose x86 instructions (except FPU, MMX and SSE instructions).

X86

DOCUMENTATION MENU. DEVELOPER DOCUMENTATION. New mac computers for sale.

Cheat

What is included

You will find various kinds of moves (MOV, CMOV, XCHG), arithmetical (ADD, SUB, MUL, DIV) and logical (AND, OR, XOR, NOT) instructions here. Several charts illustrate shifts (SHL/SHR, ROL/ROR, RCL/RCR) and stack frames. Code samples for typical high-level language constructs (if conditions, while and for loops, switches, function calls) are shown. Also included are quick references for RDTSC and CPUID instructions, description of string operations such as REP MOVSB, some code patterns for branchless conditions, a list of registers that should be saved in functions, and a lot of other useful stuff.

The idea Free software for macbook air. is to put all reference information about x86 assembly language on the one page. Some rarely-used instructions such as LDS, BOUNDS or AAA are skipped.

Notation

The cheat sheet use common notation for operands: reg means register, [mem] means memory location, and imm is an immediate operand. Also, x, y, and z denote the first, the second, and the third operand. Instruction mnemonics are written in capital letters to make them easier to find when you are skipping through the cheat sheet.

X86

Example

X86 Instruction Set Cheat Sheet Free

For example, let's look at multiplication and division section. There are instructions for signed (IMUL) and unsigned (MUL) multiplication. Both instructions take one operand, which may be register (reg) or memory ([mem]). There are three possible cases:

X86 Instruction Set Cheat Sheet Download

  • If operand size is one byte, MUL or IMUL multiplies it by al and stores the result in ax
  • If operand size is a word, MUL or IMUL multiplies it by ax and stores the high-order word of the result in dx and the low-order word in ax.
  • If operand size is a double word, MUL or IMUL multiplies it by eax and stores the high-order dword in edx and the low-order dword in eax.

There are also two-operand and three-operand forms of IMUL shown on the figure above.

Other features of assembly language are described in a similar way.

Download

The cheat sheet is designed for A4 page size; if you print it on US Letter paper, you will get large margins. You can print the cheat sheet and put it on your table to look for some instructions when you forget them.

Serbo-Croatian translation of this article by WHG Team.