0 1 2 3 4 5 6 7 8 9 A B C D E F +-----------------------------------------------------------+--------+--------+-----------------------------------------------------------+--------+--------+ | ADD | PUSH | POP | OR | PUSH | 2-byte | 0|---------+---------+---------+---------+---------+---------+ | +---------+---------+---------+---------+---------+---------+ | | | Eb,Gb | Ev,Gv | Gb,Eb | Gv,Ev | AL,Ib | eAX,Iv | ES | ES | Eb,Gb | Ev,Gv | Gb,Eb | Gv,Ev | AL,Ib | eAX,Iv | CS | escape | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | ADC | PUSH | POP | SBB | PUSH | POP | 1|---------+---------+---------+---------+---------+---------+ | +---------+---------+---------+---------+---------+---------+ | | | Eb,Gb | Ev,Gv | Gb,Eb | Gv,Ev | AL,Ib | eAX,Iv | SS | SS | Eb,Gb | Ev,Gv | Gb,Eb | Gv,Ev | AL,Ib | eAX,Iv | DS | DS | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | AND | SEG | | SUB | SEG | | 2|---------+---------+---------+---------+---------+---------+ | DAA +---------+---------+---------+---------+---------+---------+ | DAS | | Eb,Gb | Ev,Gv | Gb,Eb | Gv,Ev | AL,Ib | eAX,Iv | =ES | | Eb,Gb | Ev,Gv | Gb,Eb | Gv,Ev | AL,Ib | eAX,Iv | =CS | | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | XOR | SEG | | CMP | SEG | | 3|---------+---------+---------+---------+---------+---------+ | AAA +---------+---------+---------+---------+---------+---------+ | AAS | | Eb,Gb | Ev,Gv | Gb,Eb | Gv,Ev | AL,Ib | eAX,Iv | =SS | | Eb,Gb | Ev,Gv | Gb,Eb | Gv,Ev | AL,Ib | eAX,Iv | =CS | | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | INC general register | DEC general register | 4|---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | eAX | eCX | eDX | eBX | eSP | eBP | eSI | eDI | eAX | eCX | eDX | eBX | eSP | eBP | eSI | eDI | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | PUSH general register | POP into general register | 5|---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | eAX | eCX | eDX | eBX | eSP | eBP | eSI | eDI | eAX | eCX | eDX | eBX | eSP | eBP | eSI | eDI | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | | | BOUND | ARPL | SEG | SEG | Operand| Address| PUSH | IMUL | PUSH | IMUL | INSB | INSW/D | OUTSB |OUTSW/D | 6| PUSHA | POPA | | | | | | | | | | | | | | | | | | Gv,Ma | Ew,Rw | =FS | =GS | Size | Size | Ib | GvEvIv | Ib | GvEvIv | Yb,DX | Yb,DX | Dx,Xb | DX,Xv | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | Short displacement jump of condition (Jb) | Short-displacement jump on condition(Jb) | 7|---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | JO | JNO | JB | JNB | JZ | JNZ | JBE | JNBE | JS | JNS | JP | JNP | JL | JNL | JLE | JNLE | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | Immediate Grpl | | Grpl | TEST | XCHG | MOV | MOV | LEA | MOV | POP | 8|---------+---------+ | +---------+---------+--------+--------+---------+---------+---------+---------+ | | | | | Eb,Ib | Ev,Iv | | Ev,Iv | Eb,Gb | Ev,Gv | Eb,Gb | Ev,Gv | Eb,Gb | Ev,Gv | Gb,Eb | Gv,Ev | Ew,Sw | Gv,M | Sw,Ew | Ev | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | | XCHG word or double-word register with eAX | | | CALL | | PUSHF | POPF | | | 9| NOP +---------+---------+---------+---------+---------+--------+--------+ CBW | CWD | | WAIT | | | SAHF | LAHF | | | eCX | eDX | eBX | eSP | eBP | eSI | eDI | | | Ap | | Fv | Fv | | | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | MOV | MOVSB | MOVSW/D | CMPSB |CMPSW/D | TEST | STOSB | STOSW/D | LODSB | LODSW/D | SCASB |SCASW/D | A|---------+---------+---------+---------+ | | | +---------+---------+ | | | | | | | AL,Ob | eAX,Ov | Ob,AL | Ov,eAX | Xb,Yb | Xv,Yv | Xb,Yb | Xv,Yv | AL,Ib | eAX,Iv | Yb,AL | Yv,eAX | AL,Xb | eAX,Xv | AL,Xb |eAX,Xv | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | MOV immediate byte into byte register | MOV immediate word or double into word or double register | B|---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | AL | CL | DL | BL | AH | CH | DH | BH | eAX | eCX | eDX | eBX | eSP | eBP | eSI | eDI | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | Shift Grp2 | RET near | LES | LDS | MOV | ENTER | | RET far | INT | INT | | | C|---------+---------+---------+---------+ | +--------+--------+ | LEAVE +---------+---------+ | | INTO | IRET | | Eb,Ib | Ev,Iv | Iw | | Gv,Mp | Gv,Mp | Eb,Ib | Ev,Iv | Iw,Ib | | Iw | | 3 | Ib | | | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | Shift Grp2 | | | | | | D|---------+---------+---------+---------+ AAM | AAD | | XLAT | ESC(Escape to coprocessor instruction set) | | Eb,1 | Ev,1 | Eb,CL | Ev,CL | | | | | | +---------+---------+---------+---------+---------+---------+--------+--------+---------+-----------------------------+-------------------+-----------------+ | LOOPNE | LOOPE | LOOP | JCXZ | IN | OUT | CALL | JNP | IN | OUT | E| | | | +---------+---------+--------+--------+ +---------+---------+---------+---------+---------+--------+--------+ | Jb | Jb | Jb | Jb | AL,Ib | eAX,Ib | Ib,AL | Ib,eAX | Av | Jv | Ap | Jb | AL,DX | eAX,DX | DX,AL | DX,eAX | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | | | | REP | | | Unary Grp3 | | | | | | |INC/DEC |Indirct | F| LOCK | | REPNE | | HLT | CMC +--------+--------+ CLC | STC | CLI | STI | CLD | STD | | | | | | | REPE | | | Eb | Ev | | | | | | | Grp4 | Grp5 | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+
0 1 2 3 4 5 6 7 8 9 A B C D E F +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | | | LAR | LSL | | | | | | | | | | | | | 0| Grp6 | Grp7 | | | | | CLTS | | | | | | | | | | | | | Gw,Ew | Gv,Ew | | | | | | | | | | | | | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | | | | | | | | | | | | | | | | | 1| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | MOV | MOV | MOV | MOV | MOV | | MOV | | | | | | | | | | 2| | | | | | | | | | | | | | | | | | Cd,Rd | Dd,Rd | Rd,Cd | Rd,Dd | Td,Rd | | Rd,Td | | | | | | | | | | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | | | | | | | | | | | | | | | | | 3| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | | | | | | | | | | | | | | | | | 4| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | | | | | | | | | | | | | | | | | 5| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | | | | | | | | | | | | | | | | | 6| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | | | | | | | | | | | | | | | | | 7| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | Long-displacement jump on condition (Jv) | Long-displacement jump on condition (Jv) | 8|---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | JO | JNO | JB | JNB | JZ | JNZ | JBE | JNBE | JS | JNS | JP | JNP | JL | JNL | JLE | JNLE | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | Byte Set on condition (Eb) | | | | | | | | | 9|---------+---------+---------+---------+---------+---------+--------+--------+ SETS | SETNS | SETP | SETNP | SETL | SETNL | SETLE | SETNLE | | SETO | SETNO | SETB | SETNB | SETZ | SETNZ | SETBE | SETNBE | | | | | | | | | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | PUSH | POP | | BT | SHLD | SHLD | | | PUSH | POP | | BTS | SHRD | SHRD | | IMUL | A| | | | | | | | | | | | | | | | | | FS | FS | | Ev,Gv | EvGvIb | EvGvCL | | | GS | GS | | Ev,Gv | EvGvIb | EvGvCL | | Gv,Ev | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | | | LSS | BTR | LFS | LGS | MOVZX | | | Grp-8 | BTC | BSF | BSR | MOVSX | B| | | | | | +--------+--------+ | | | | | +-----------------+ | | | Mp | Ev,Gv | Mp | Mp | Gv,Eb | Gv,Ew | | | Ev,Ib | Ev,Gv | Gv,Ev | Gv,Ev | Gv,Eb Gv,Ew | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | | | | | | | | | | | | | | | | | C| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | | | | | | | | | | | | | | | | | D| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | | | | | | | | | | | | | | | | | E| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+ | | | | | | | | | | | | | | | | | F| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +---------+---------+---------+---------+---------+---------+--------+--------+---------+---------+---------+---------+---------+---------+--------+--------+
G +-------+-------+-------+ r | mod | nnn | R/M | o +-------+-------+-------+ u p 000 001 010 011 100 101 110 111 +-------+-------+-------+-------+-------+-------+-------+-------+ 1| ADD | OR | ADC | SBB | AND | SUB | XOR | CMP | | | | | | | | | | +-------+-------+-------+-------+-------+-------+-------+-------+ 2| ROL | ROR | RCL | RCR | SHL | SHR | | SAR | | | | | | | | | | +-------+-------+-------+-------+-------+-------+-------+-------+ 3| TEST | | NOT | NEG | MUL | IMUL | DIV | IDIV | | Ib/Iv | | | |AL/eAX |AL/eAX |AL/eAX |AL/eAX | +-------+-------+-------+-------+-------+-------+-------+-------+ 4| INC | DEC | | | | | | | | Eb | Eb | | | | | | | +-------+-------+-------+-------+-------+-------+-------+-------+ 5| INC | DEC | CALL | CALL | JMP | JMP | PUSH | | | Ev | Ev | Ev | eP | Ev | Ep | Ev | | +-------+-------+-------+-------+-------+-------+-------+-------+
G +-------+-------+-------+ r | mod | nnn | R/M | o +-------+-------+-------+ u p 000 001 010 011 100 101 110 111 +-------+-------+-------+-------+-------+-------+-------+-------+ 6| SLDT | STR | LLDT | LTR | VERR | VERW | | | | Ew | Ew | Ew | Ew | Ew | Ew | | | +-------+-------+-------+-------+-------+-------+-------+-------+ 7| SGDT | SIDT | LGDT | LIDT | SMSW | | LMSW | | | Ms | Ms | Ms | Ms | Ew | | Ew | | +-------+-------+-------+-------+-------+-------+-------+-------+ 8| | | | | BT | BTS | BTR | BTC | | | | | | | | | | +-------+-------+-------+-------+-------+-------+-------+-------+
up:
Appendices
next:
Appendix B -- Complete Flag Cross-Reference