Folha de Instrucoes 8086

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Disciplina de Microprocessadores

Tabela de Instruções do Intel 8086


TRANSFERÊNCIA FLAGS ALTERADAS
Nome Significado Sintaxe Descrição Tipo O D I T S Z A P C
MOV Mov (copy) MOV Dest, Source Dest=Source rr rm ri mr mi
XCHG Exchange XCHG Op1, Op2 Op1=Op2, Op2=Op1 rr rm mr

PUSH Push onto stack PUSH Source DEC SP, [SP]=Source rmi
PUSHF Push flags PUSHF O, D, I, T, S, Z, A, P, C
POP Pop from stack POP Dest Dest=[SP], inc SP rmi
POPF Pop flags POPF O, D, I, T, S, Z, A, P, C ± ± ± ± ± ± ± ± ±

IN Input IN Dest,Port AL/AX =byte/word of specified port


OUT Output OUT Port, Source Byte/word of specified port=AL/AX

ARITMÉTICAS FLAGS ALTERADAS


Nome Significado Sintaxe Descrição Tipo O D I T S Z A P C
ADD Add ADD Dest, Source Dest=Dest+Source rr rm ri mr mi ± ± ± ± ± ±
ADC Add with carry ADC Dest, Source Dest=Dest+Source+CF rr rm ri mr mi ± ± ± ± ± ±
SUB Subtract SUB Dest, Source Dest=Dest-Source rr rm ri mr mi ± ± ± ± ± ±
SBB Subtract with borrow SBB Dest, Source Dest=Dest-(Source+CF) rr rm ri mr mi ± ± ± ± ± ±
DIV Divide (unsigned) DIV Op Op=byte: AL=AX/Op , AH=Rest rm ? ? ? ? ? ?
DIV Divide (unsigned) DIV Op Op=Word: AX=DX:AX/Op, DX=Rest rm ? ? ? ? ? ?
IDIV Signed Integer Divide IDIV Op Op=Byte: AL=AX/Op, AH=Rest rm ? ? ? ? ? ?
IDIV Signed Integer Divide IDIV Op Op=Word: AX=DX:AX/Op, DX=Rest rm ? ? ? ? ? ?
MUL Multiply (unsigned) MUL Op Op=Byte: AX=AL*Op if AH=0 rm ± ? ? ? ? ±
MUL Multiply (unsigned) MUL Op Op=Word: DX:AX=AX*Op if DX=0 rm ± ? ? ? ? ±
IMUL Signed Integer Multiply IMUL Op Op=Byte: AX=AL*Op if AL sufficient rm ± ? ? ? ? ±
IMUL Signed Integer Multiply IMUL Op Op=Word: DX:AX=AX*Op if AX suff. rm ± ? ? ? ? ±
INC Increment INC Op Op=Op+1 (carry not affected) rm ± ± ± ± ±
DEC Decrement DEC Op Op=Op-1 (Carry not affected) rm ± ± ± ± ±

CMP Compare CMP Op1, Op2 Op1-Op2 rr rm ri mr mi ± ± ± ± ± ±

SHIFT e ROTAÇÃO FLAGS ALTERADAS


Nome Significado Sintaxe Descrição Tipo O D I T S Z A P C
SAL Shift arithmetic left (SHL) SAL Op, Quantity cf destino 0 rr ri mr mi i ± ± ? ± ±
SAR Shift arithmetic right SAR Op, Quantity destino cf rr ri mr mi i ± ± ? ± ±

RCL Rotate left through Carry RCL, Op, Quantity cf destino rr ri mr mi i ±

RCR Rotate right through Carry RCR, Op, Quantity destino cf rr ri mr mi i ±

ROL Rotate left ROL, Op, Quantity cf destino rr ri mr mi i ±

ROR Rotate right ROR, Op, Quantity destino cf rr ri mr mi i ±

SHL Shift logical left (SAL) SHL Op, Quantity ≈ SAL rr ri mr mi i ± ± ? ± ±


SHR Shift logical right SHR Op, Quantity 0 destino cf rr ri mr mi i ± ± ? ± ±

i para mais informação ver especificações de cada instrução

OUTRAS INSTRUÇÕES FLAGS ALTERADAS


Nome Significado Sintaxe Descrição Tipo O D I T S Z A P C
NOP No operation NOP No operation

LEA Load effective adress LEA Dest, Source Dest=address os Source

INT Interrupt INT nr Interrupts current program, runs spec. int 0 0

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

CBW Convert byte to word CBW AX=AL (signed)


CWD Convert word to double CWD DX:AX=AX (signed) ± ± ± ± ± ±

LÓGICAS FLAGS ALTERADAS


Nome Significado Sintaxe Descrição Tipo O D I T S Z A P C
NEG Negative (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) rm
AND Logical and AND Dest, Source Dest=DestSource rr rm ri mr mi 0 ± ± ? ± ±
OR Logical or OR Dest, Source Dest=DestSource rr rm ri mr mi 0 ± ± ? ± ±
XOR Logical exclusive or XOR Dest, Source Dest=Dest(exor)Source rr rm ri mr mi 0 ± ± ? ± ±
TEST Testa o estado de certos bits TEST Dest, Source rr rm ri mr mi

JUMPS (não alteram flags) JUMPS (sem sinal)


Nome Significado Sintaxe Descrição Tipo Nome Significado Sintaxe Descrição Tipo
CALL Call subrotine CALL proc JA Jump if above JA Dest  JNBE
JAE Jump if above or equal JAE Dest  JNB
RET Return from RET
subrotine JB Jump if below JB Dest  JNAE
IRET Pop do IP, CS Flags JBE Jump if below or equal JBE Dest  JNA
JNA Jump if not above JNA Dest  JBE
JMP Jump JMP Dest
JNAE Jump if not above or equal JNAE Dest  JB
JE Jump if equal JE Dest  JZ JNB Jump if not below JNB Dest  JAE
JNE Jump if not equal JNE Dest  JNZ JNBE Jump if not below or equal JNBE Dest  JA
JZ Jump if zero JZ Dest  JE JC Jump if carry JC Dest
JNZ Jump if not zero JNZ Dest  JNE JNC Jump if not carry JNC Dest
JP Jump if parity (even) JP Dest  JPE JUMPS (com sinal)
JNP Jump if no parity JNP Dest  JPO JG Jump if Greater JG Dest  JNLE
JPE Jump if parity even JPE Dest  JP JGE Jump if Greater or Equal JGE Dest  JNL
JPO Jump if parity odd JPO Dest  JNP JL Jump if Less JL Dest  JNGE
JLE Jump if Less or Equal JLE Dest  JNG
REGISTO DE FLAG JNG Jump if Not Greater JNG Dest  JLE
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 JNGE Jump if Not Greater or Equal JNGE Dest  JL
O D I T S Z A P C JNL Jump if Not Less JNL Dest  JGE
JNLE Jump if Not Less or Equal JNLE Dest  JG
0 = Overflow Z = Zero JO Jump if Overflow JO Dest
D = Direction A = Auxiliary Carry JNO Jump if Not Overflow JNO Dest
I = Interrupt P = Parity
JS Jump if Sign (negative) JS Dest
T = Trap C = Carry
S = Sign JNS Jump if No Sign (positivo) JNS Dest

LEGENDA
r = registo rr = registoregisto ri = registoimediato mi = memóriaimediato
m= memória rm = registomemória mr = memóriaregisto I = imediato

EXEMPLOS
Mov ax,bx registoregisto Mov cl, 50 registoimediato Mov al, var registomemória Mov var,bx memóriaregisto

Tabela ASCII

You might also like