Intel Code Table
Intel Code Table
Intel Code Table
TRANSFER Flags
Name Comment Code Operation O D I T S Z A P C
MOV Move (copy) MOV Dest,Source Dest:=Source
XCHG Exchange XCHG Op1,Op2 Op1:=Op2 , Op2:=Op1
STC Set Carry STC CF:=1 1
CLC Clear Carry CLC CF:=0 0
CMC Complement Carry CMC CF:= ¬ CF ±
STD Set Direction STD DF:=1 (string op's downwards) 1
CLD Clear Direction CLD DF:=0 (string op's upwards) 0
STI Set Interrupt STI IF:=1 1
CLI Clear Interrupt CLI IF:=0 0
PUSH Push onto stack PUSH Source DEC SP, [SP]:=Source
PUSHF Push flags PUSHF O, D, I, T, S, Z, A, P, C 286+: also NT, IOPL
PUSHA Push all general registers PUSHA AX, CX, DX, BX, SP, BP, SI, DI
POP Pop from stack POP Dest Dest:=[SP], INC SP
POPF Pop flags POPF O, D, I, T, S, Z, A, P, C 286+: also NT, IOPL ± ± ± ± ± ± ± ± ±
POPA Pop all general registers POPA DI, SI, BP, SP, BX, DX, CX, AX
CBW Convert byte to word CBW AX:=AL (signed)
CWD Convert word to double CWD DX:AX:=AX (signed) ± ± ± ± ± ±
CWDE Conv word extended double CWDE 386 EAX:=AX (signed)
IN i Input IN Dest, Port AL/AX/EAX := byte/word/double of specified port
OUT i Output OUT Port, Source Byte/word/double of specified port := AL/AX/EAX
i for more information see instruction specifications Flags: ±=affected by this instruction ?=undefined after this instruction
ARITHMETIC Flags
Name Comment Code Operation O D I T S Z A P C
ADD Add ADD Dest,Source Dest:=Dest+Source ± ± ± ± ± ±
ADC Add with Carry ADC Dest,Source Dest:=Dest+Source+CF ± ± ± ± ± ±
SUB Subtract SUB Dest,Source Dest:=Dest-Source ± ± ± ± ± ±
SBB Subtract with borrow SBB Dest,Source Dest:=Dest-(Source+CF) ± ± ± ± ± ±
DIV Divide (unsigned) DIV Op Op=byte: AL:=AX / Op AH:=Rest ? ? ? ? ? ?
DIV Divide (unsigned) DIV Op Op=word: AX:=DX:AX / Op DX:=Rest ? ? ? ? ? ?
DIV 386 Divide (unsigned) DIV Op Op=doublew.: EAX:=EDX:EAX / Op EDX:=Rest ? ? ? ? ? ?
IDIV Signed Integer Divide IDIV Op Op=byte: AL:=AX / Op AH:=Rest ? ? ? ? ? ?
IDIV Signed Integer Divide IDIV Op Op=word: AX:=DX:AX / Op DX:=Rest ? ? ? ? ? ?
IDIV 386 Signed Integer Divide IDIV Op Op=doublew.: EAX:=EDX:EAX / Op EDX:=Rest ? ? ? ? ? ?
MUL Multiply (unsigned) MUL Op Op=byte: AX:=AL*Op if AH=0 ♦ ± ? ? ? ? ±
MUL Multiply (unsigned) MUL Op Op=word: DX:AX:=AX*Op if DX=0 ♦ ± ? ? ? ? ±
MUL 386 Multiply (unsigned) MUL Op Op=double: EDX:EAX:=EAX*Op if EDX=0 ♦ ± ? ? ? ? ±
IMUL i Signed Integer Multiply IMUL Op Op=byte: AX:=AL*Op if AL sufficient ♦ ± ? ? ? ? ±
IMUL Signed Integer Multiply IMUL Op Op=word: DX:AX:=AX*Op if AX sufficient ♦ ± ? ? ? ? ±
IMUL 386 Signed Integer Multiply IMUL Op Op=double: EDX:EAX:=EAX*Op if EAX sufficient ♦ ± ? ? ? ? ±
INC Increment INC Op Op:=Op+1 (Carry not affected !) ± ± ± ± ±
DEC Decrement DEC Op Op:=Op-1 (Carry not affected !) ± ± ± ± ±
CMP Compare CMP Op1,Op2 Op1-Op2 ± ± ± ± ± ±
SAL Shift arithmetic left (≡ SHL) SAL Op,Quantity i ± ± ? ± ±
SAR Shift arithmetic right SAR Op,Quantity i ± ± ? ± ±
RCL Rotate left through Carry RCL Op,Quantity i ±
RCR Rotate right through Carry RCR Op,Quantity i ±
ROL Rotate left ROL Op,Quantity i ±
ROR Rotate right ROR Op,Quantity i ±
i for more information see instruction specifications ♦ then CF:=0, OF:=0 else CF:=1, OF:=1
LOGIC Flags
Name Comment Code Operation O D I T S Z A P C
NEG Negate (two-complement) NEG Op Op:=0-Op if Op=0 then CF:=0 else CF:=1 ± ± ± ± ± ±
NOT Invert each bit NOT Op Op:=¬ Op (invert each bit)
AND Logical and AND Dest,Source Dest:=Dest∧ Source 0 ± ± ? ± 0
OR Logical or OR Dest,Source Dest:=Dest∨Source 0 ± ± ? ± 0
XOR Logical exclusive or XOR Dest,Source Dest:=Dest (exor) Source 0 ± ± ? ± 0
SHL Shift logical left (≡ SAL) SHL Op,Quantity i ± ± ? ± ±
SHR Shift logical right SHR Op,Quantity i ± ± ? ± ±
This page may be freely distributed without cost provided it is not changed. Send comments to [email protected] - www.jegerlehner.ch/intel/
V 2.22 - All rights reserved
Assembler 80186 and higher CodeTable 2/2 © 1996-2002 by R. Jegerlehner
MISC Flags
Name Comment Code Operation O D I T S Z A P C
NOP No operation NOP No operation
LEA Load effective address LEA Dest,Source Dest := address of Source
INT Interrupt INT Nr interrupts current program, runs spec. int-program 0 0
JP Jump if Parity (Parity Even) JP Dest (≡ JPE) JNP Jump if no Parity (Parity Odd) JNP Dest (≡ JPO)
JPE Jump if Parity Even JPE Dest (≡ JP) JPO Jump if Parity Odd JPO Dest (≡ JNP)