X8664 NASM Assembly Quick Reference ('Cheat Sheet') Here's the full list of ordinary integer x86 registers. The 64 bit registers are shown in red. ARM Assembly Basics Cheatsheet This ARM assembly basics cheatsheet covers registers, instructions, branching, and conditional execution. You can use it as a guideline if you’re starting out with ARM assembly and need a little refresher of the basics.
Jumps
Tests
84TestOthers
90nop, no operationThis post is just a little cheat sheet for myself on Intel & AT&T syntax.
A useful table mapping some simple instructions between the two syntaxes linked through from the GCC-Inline-Assembly-HOWTO:
Intel Code | AT&T Code |
---|---|
mov eax,1 | movl $1,%eax |
mov ebx,0ffh | movl $0xff,%ebx |
int 80h | int $0x80 |
mov ebx, eax | movl %eax, %ebx |
mov eax,[ecx] | movl (%ecx),%eax |
mov eax,[ebx+3] | movl 3(%ebx),%eax |
mov eax,[ebx+20h] | movl 0x20(%ebx),%eax |
add eax,[ebx+ecx*2h] | addl (%ebx,%ecx,0x2),%eax |
lea eax,[ebx+ecx] | leal (%ebx,%ecx),%eax |
sub eax,[ebx+ecx*4h-20h] | subl -0x20(%ebx,%ecx,0x4),%eax |
Some important points to note:
Intel X86 Assembly Cheat Sheet
- Source and destinations are flipped in opcodes.
- Intel is dest, src
- AT&T is src, dest
- AT&T decorates registers and immediates
- Registers are prefixed with a “%”
- Immediates are prefixed with a “$”. This applies to variables being passed in from C (when you’re inline).
- Intel decorates memory operands to denote the operand’s size, AT&T uses different mnemonics to accomplish the same.
- Intel syntax to dereference a memory location is “[ ]”. AT&T uses “( )”.
X86 Assembly Cheat Sheet Pdf
Related Posts
![](https://cdn-ak.f.st-hatena.com/images/fotolife/r/ruriatunifoefec/20200910/20200910011327.png)