0% found this document useful (0 votes)
667 views9 pages

8086 Instruction Set

This document provides a summary of selected 8086 instructions including: - Brief descriptions of instructions like ADD, AND, CALL, CMP, DEC, DIV, IMUL, INC, INT, IRET, JMP, LEA, MOV, MUL, and others. - Information on instruction syntax, operation, flags affected, and usage notes. - Terminology used in the instruction set like memory, register, and immediate.

Uploaded by

Srinivas Paluri
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
667 views9 pages

8086 Instruction Set

This document provides a summary of selected 8086 instructions including: - Brief descriptions of instructions like ADD, AND, CALL, CMP, DEC, DIV, IMUL, INC, INT, IRET, JMP, LEA, MOV, MUL, and others. - Information on instruction syntax, operation, flags affected, and usage notes. - Terminology used in the instruction set like memory, register, and immediate.

Uploaded by

Srinivas Paluri
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

11/22/12

8086 Instruction Set

Selected 8086 Instructions


Quick Reference List
ac d ad d ad n cl al cw b ci l cd w cp m dc e dv i ii dv iu ml i n ic n it n ie rt j? ? jp m la e mv o ml u ng e np o nt o o r ot u pp o pp of ps uh psf uh rt e sl a sr a sb b sl h sr h si t sb u ts et xr o Adwt cryfa d ih ar lg Adtonmes d w ubr BtielgclAD iws oia N Cl poeueo fnto al rcdr r ucin Cnetbt t wr (ind ovr ye o od sge) Ceritrutfa (ial itrut) la nerp lg dsbe nerps Cnetwr t dulwr (ind ovr od o obeod sge) Cmaetooead opr w prns Dceetb 1 ermn y Usge dvd nind iie Sge dvd ind iie Sge mlil ind utpy Ipt(ed fo pr nu ra) rm ot Iceetb 1 nrmn y Cl t itrutpoeue al o nerp rcdr Itrutrtr nerp eun Jm i ? cniinmt up f ? odto e Ucniinljm nodtoa up La efcieadesofe od fetv drs fst Mv dt oe aa Usge mlil nind utpy Toscmlmn ngt w' opeet eae N oeain o prto Oescmlmn ngt n' opeet eae BtielgclO iws oia R Otu (rt)t pr upt wie o ot Ppwr fo sak o od rm tc Ppfasfo sak o lg rm tc Ps wr ot sak uh od no tc Ps fasot sak uh lg no tc Rtr fo poeueo fnto eun rm rcdr r ucin Btieaihei lf sit(aea sl iws rtmtc et hf sm s h) Btieaihei rgtsit(ind iws rtmtc ih hf sge) Sbrc wt bro utat ih orw Btielf sit(aea sl iws et hf sm s a) Btiergtsit(nind iws ih hf usge) Stitrutfa (nbeitrut) e nerp lg eal nerps Sbrc tonmes utat w ubr Btielgclcmae iws oia opr BtielgclXR iws oia O

Detailed Instruction List


A complete listing of all x86 instructions along with usage and encoding information can be found in the NASM Manual (852 KB). However, when using this manual, be careful to only use instructions compatible with the 8086. The Am186/Am188 Instruction Set Manual (2,242 KB) contains a more detailed description of instruction behavior for instructions compatible with the 8086. However, these AMD processors also support
ece425web.groups.et.by u.net/stable/labs/8086InstructionSet.html#mul 1/9

11/22/12

8086 Instruction Set

the following x86 instructions which are not 8086 compatible: bound, enter, ins, leave, outs, popa, and pusha. Important Usage Notes: 1. The first operand of an instruction is also the destination if there is a resulting value. Divide and multiply instructions are common exceptions to this rule. 2. There can be at most one memory operand per instruction. 3. There can be at most one immediate operand per instruction. 4. Operands generally must be of the same size (i.e., byte or word). 5. Using a label is the same as using an immediate or constant value. 6. When BP is used in a memory reference, SS is assumed as the segment. Otherwise DS is assumed. 7. While an instruction is executing, IP refers to the next instruction. 8. Many instructions are smaller if you use the appropriate registers (usually AX or AL). 9. In NASM, all labels are case sensitive but instruction and register names are not. Terminology Used: memory - Refers to an 8 or 16-bit memory location determined by an effective address. register - AX, BX, CX, DX, SI, DI, BP, or SP as well as the 8-bit derivatives of AX, BX, CX, and DX (other registers or flags are not allowed). immediate - A numeric constant or label. REG1::REG2 - The concatenation of two registers (e.g., the 32-bit value DX::AX) A single colon is used for memory addresses. XF or XF=b - A flag's value after an instruction can be 0 or 1 and usually depends on the result of the instruction. A flag being set to '?' by an instruction indicates that the flag is undefined after the operation. Instructions:
ac d Adwt cryfa d ih ar lg Sna: ytx ac d ds,sc et r ds:mmr o rgse et eoy r eitr sc mmr,rgse,o imdae r: eoy eitr r meit Ato:ds =ds +sc+C cin et et r F FasAfce:O,S,Z,A,P,C lg fetd F F F F F F Nts Ti isrcini ue t prom3-i adto. oe: hs ntuto s sd o efr 2bt diin

ad d Adtonmes d w ubr Sna: ytx ad d ds,sc et r ds:rgse o mmr et eitr r eoy sc rgse,mmr,o imdae r: eitr eoy r meit Ato:ds =ds +sc cin et et r FasAfce:O,S,Z,A,P,C lg fetd F F F F F F Nts Wrsfrbt sge adusge nmes oe: ok o oh ind n nind ubr.

ad n

BtielgclAD iws oia N


2/9

ece425web.groups.et.by u.net/stable/labs/8086InstructionSet.html#mul

11/22/12

8086 Instruction Set

Sna: ytx ad n ds,sc et r ds:rgse o mmr et eitr r eoy sc rgse,mmr,o imdae r: eitr eoy r meit Ato:ds =ds &sc cin et et r FasAfce:O=,S,Z,A=,P,C= lg fetd F0 F F F? F F0

cl al Cl poeueo fnto al rcdr r ucin Sna: ytx cl al ad dr ad:rgse,mmr,o imdae dr eitr eoy r meit Ato:Ps I ot sak stI t ad. cin uh P no tc, e P o dr FasAfce:Nn lg fetd oe

cw b Cnetbt t wr (ind ovr ye o od sge) Sna: ytx cw b Ato:Sg etn A t cet awr i A. cin in xed L o rae od n X FasAfce:Nn lg fetd oe Nts Frusge nmesue"o a,0. oe: o nind ubr s mv h "

ci l Ceritrutfa (ial itrut) la nerp lg dsbe nerps Sna: ytx ci l Ato:CerI cin la F FasAfce:I= lg fetd F0

cp m Cmaetooead opr w prns Sna: ytx cp m o1 o2 p, p o1 rgse o mmr p: eitr r eoy o2 rgse,mmr,o imdae p: eitr eoy r meit Ato:Promo1o2 dsadn tersl btstigtefas cin efr p-p, icrig h eut u etn h lg. FasAfce:O,S,Z,A,P,C lg fetd F F F F F F Nts Uulyue bfr acniinljm isrcin oe: sal sd eoe odtoa up ntuto.

cd w Cnetwr t dulwr (ind ovr od o obeod sge) Sna: ytx cd w Ato:Sg etn A t fl D,cetn adodcnandi D:A. cin in xed X o il X raig wr otie n X:X FasAfce:Nn lg fetd oe Nts Frusge nmesue"o d,d"t cerD. oe: o nind ubr s xr x x o la X

dc e Dceetb 1 ermn y Sna: ytx dc e o p o:rgse o mmr p eitr r eoy Ato:o =o -1 cin p p FasAfce:O,S,Z,A,P lg fetd F F F F F

dv i Usge dvd nind iie Sna: ytx dv i o8 p dv i o1 p6 o8 8btrgse o mmr p: -i eitr r eoy o1:1-i rgse o mmr p6 6bt eitr r eoy Ato:I oeadi o8 usge A =A /o8 ad A =A %o8 cin f prn s p, nind L X p n H X p I oeadi o1,usge A =D:A /o1 ad D =D:A %o1 f prn s p6 nind X X:X p6 n X X:X p6
ece425web.groups.et.by u.net/stable/labs/8086InstructionSet.html#mul 3/9

11/22/12

8086 Instruction Set

FasAfce:O=,S=,Z=,A=,P=,C= lg fetd F? F? F? F? F? F? Nts Prom bt dvso admdlsoeain i oeisrcin oe: efrs oh iiin n ouu prtos n n ntuto.

ii dv Sge dvd ind iie Sna: ytx ii dv o8 p ii dv o1 p6 o8 8btrgse o mmr p: -i eitr r eoy o1:1-i rgse o mmr p6 6bt eitr r eoy Ato:I oeadi o8 sge A =A /o8 ad A =A %o8 cin f prn s p, ind L X p n H X p I oeadi o1,sge A =D:A /o1 ad D =D:A %o1 f prn s p6 ind X X:X p6 n X X:X p6 FasAfce:O=,S=,Z=,A=,P=,C= lg fetd F? F? F? F? F? F? Nts Prom bt dvso admdlsoeain i oeisrcin oe: efrs oh iiin n ouu prtos n n ntuto.

iu ml Sge mlil ind utpy Sna: ytx iu ml o8 p iu ml o1 p6 o8 8btrgse o mmr p: -i eitr r eoy o1:1-i rgse o mmr p6 6bt eitr r eoy Ato:I oeadi o8 sge A =A *o8 cin f prn s p, ind X L p I oeadi o1,sge D:A =A *o1 f prn s p6 ind X:X X p6 FasAfce:O,S=,Z=,A=,P=,C lg fetd F F? F? F? F? F

i n Ipt(ed fo pr nu ra) rm ot Sna: ytx i n A,o8 L p i n A,o8 X p o8 8btimdaeo D p: -i meit r X Ato:I dsiaini A,ra bt fo 8btpr o8 cin f etnto s L ed ye rm -i ot p. I dsiaini A,ra wr fo 1-i pr o8 f etnto s X ed od rm 6bt ot p. FasAfce:Nn lg fetd oe

ic n Iceetb 1 nrmn y Sna: ytx ic n o p o:rgse o mmr p eitr r eoy Ato:o =o +1 cin p p FasAfce:O,S,Z,A,P lg fetd F F F F F

it n Cl t itrutpoeue al o nerp rcdr Sna: ytx it n im m8 im:8btusge imdae m8 -i nind meit Ato:Ps fas C,adI;cerI adT (ialn itrut) la cin uh lg, S n P la F n F dsbig nerps; od wr a ades(m84 it I adwr a (m84+2 it C. od t drs im*) no P n od t im* ) no S FasAfce:I=,T= lg fetd F0 F0 Nts Ti isrcini uulyue t cl sse ruie. oe: hs ntuto s sal sd o al ytm otns

ie rt Itrutrtr nerp eun Sna: ytx ie rt Ato:PpI,C,adfas(nta odr. cin o P S n lg i ht re) FasAfce:Al lg fetd l Nts Ti isrcini ue a teedo IR. oe: hs ntuto s sd t h n f Ss

ece425web.groups.et.by u.net/stable/labs/8086InstructionSet.html#mul

4/9

11/22/12

j? ? Jm i ? cniinmt up f ? odto e Sna: ytx j? ? rl e8 rl:8btsge imdae e8 -i ind meit Ato:I cniin? mt I =I +rl (inetnsrl) cin f odto ? e, P P e8 sg xed e8 FasAfce:Nn lg fetd oe Nts Uetecpisrcint cmaetooead te j?t jm oe: s h m ntuto o opr w prns hn ? o up cniinly Te? o teisrcinnm rpeet tejm odtoal. h ? f h ntuto ae ersns h up cniin alwn frfloigisrcin: odto, loig o olwn ntutos j a je a j b je b j e je n j g je g j l je l jm i aoe usge > up f bv, nind jm i aoeo eul usge > up f bv r qa, nind = jm i blw usge < up f eo, nind jm i blwo eul usge < up f eo r qa, nind = jm i eul = up f qa, = jm i nteul ! up f o qa, = jm i getrta,sge > up f rae hn ind jm i getrta o eul sge > up f rae hn r qa, ind = jm i ls ta,sge < up f es hn ind jm i ls ta o eul sge < up f es hn r qa, ind =

Alo te? sfie cnas b o tefr n?(.. jafr l f h ? ufxs a lo e f h om ? eg, n o jm i ntaoe.Se88 dcmnainfrmn mr ? cniin. up f o bv) e 06 ouetto o ay oe ? odtos A asmlrlblsol b ue i paeo terl oead Te n sebe ae hud e sd n lc f h e8 prn. h asmlrwl te cluaeterltv dsac t jm. sebe il hn aclt h eaie itne o up Nt as ta rl oeadgetylmt cniinljm dsac oe lo ht e8 prn ral iis odtoa up itne (17t +2 btsfo I) Uetejpisrcini cmiain -2 o 18 ye rm P. s h m ntuto n obnto wt j?t oecm ti brir ih ? o vroe hs are.

jp m Ucniinljm nodtoa up Sna: ytx jm up rl e jm up o1 p6 jm up sgof e:f rl 8o 1-i sge imdae e: r 6bt ind meit o1:1-i rgse o mmr p6 6bt eitr r eoy sgof Imdae1-i sgetad1-i ofe e:f: meit 6bt emn n 6bt fst Ato:I oeadi rl I =I +rl cin f prn s e, P P e I oeadi o1,I =o1 f prn s p6 P p6 I oeadi sgof C =sg I =of f prn s e:f, S e, P f FasAfce:Nn lg fetd oe Nts A asmlrlblsol b ue i paeo terl oead Te oe: n sebe ae hud e sd n lc f h e8 prn. h asmlrwl te cluaeterltv dsac t jm. sebe il hn aclt h eaie itne o up

la e La efcieadesofe od fetv drs fst Sna: ytx la e rg6 mme e1, erf rg6 1-i rgse e1: 6bt eitr mme:A efciemmr ades(.. [x2) erf n fetv eoy drs eg, b+] Ato:rg6=adesofe o mme cin e1 drs fst f erf FasAfce:Nn lg fetd oe Nts Ti isrcini ue t esl cluaeteadeso dt i oe: hs ntuto s sd o aiy aclt h drs f aa n mmr.I de ntatal acs mmr. eoy t os o culy ces eoy

mv o

Mv dt oe aa

ece425web.groups.et.by u.net/stable/labs/8086InstructionSet.html#mul

Sna: ytx mv o ds,sc et r ds:rgse o mmr et eitr r eoy sc rgse,mmr,o imdae r: eitr eoy r meit Ato:ds =sc cin et r FasAfce:Nn lg fetd oe

ml u Usge mlil nind utpy Sna: ytx ml u o8 p ml u o1 p6 o8 8btrgse o mmr p: -i eitr r eoy o1:1-i rgse o mmr p6 6bt eitr r eoy Ato:I oeadi o8 usge A =A *o8 cin f prn s p, nind X L p I oeadi o1,usge D:A =A *o1 f prn s p6 nind X:X X p6 FasAfce:O,S=,Z=,A=,P=,C lg fetd F F? F? F? F? F

ng e Toscmlmn ngt w' opeet eae Sna: ytx ng e o p o:rgse o mmr p eitr r eoy Ato:o =0-o cin p p FasAfce:O,S,Z,A,P,C lg fetd F F F F F F

np o N oeain o prto Sna: ytx np o Ato:Nn cin oe FasAfce:Nn lg fetd oe

nt o Oescmlmn ngt n' opeet eae Sna: ytx nt o o p o:rgse o mmr p eitr r eoy Ato:o =~p cin p o FasAfce:Nn lg fetd oe

o r BtielgclO iws oia R Sna: ytx o r ds,sc et r ds:rgse o mmr et eitr r eoy sc rgse,mmr,o imdae r: eitr eoy r meit Ato:ds =ds |sc cin et et r FasAfce:O=,S,Z,A=,P,C= lg fetd F0 F F F? F F0

ot u Otu (rt)t pr upt wie o ot Sna: ytx ot u o,A p L ot u o,A p X o:8btimdaeo D p -i meit r X Ato:I suc i A,wiebt i A t 8btpr o. cin f ore s L rt ye n L o -i ot p I suc i A,wiewr i A t 1-i pr o. f ore s X rt od n X o 6bt ot p FasAfce:Nn lg fetd oe

pp o Ppwr fo sak o od rm tc Sna: ytx pp o o1 p6 rg6 1-i rgse o mmr e1: 6bt eitr r eoy

11/22/12

8086 Instruction Set

Ato:Ppwr oftesakadpaei i o1 (.. o1 =[SS] cin o od f h tc n lc t n p6 ie, p6 S:P te S =S +2. hn P P ) FasAfce:Nn lg fetd oe Nts Psigadppigo S adS aealwdbtsrnl dsorgd oe: uhn n opn f S n P r loe u togy icuae.

pp of Ppfasfo sak o lg rm tc Sna: ytx pp of Ato:Ppwr fo sakadpaei i fasrgse. cin o od rm tc n lc t n lg eitr FasAfce:Al lg fetd l

ps uh Ps wr ot sak uh od no tc Sna: ytx ps uh o1 p6 o1:1-i rgse o mmr p6 6bt eitr r eoy Ato:Ps o1 ot tesak(.. S =S -2te [SS]=o1) cin uh p6 no h tc ie, P P hn S:P p6. FasAfce:Nn lg fetd oe Nts Psigadppigo S adS aealwdbtsrnl dsorgd oe: uhn n opn f S n P r loe u togy icuae.

psf Ps fasot sak uh uh lg no tc Sna: ytx psf uh Ato:Ps fasot saka awr. cin uh lg no tc s od FasAfce:Nn lg fetd oe

rt e Rtr fo poeueo fnto eun rm rcdr r ucin Sna: ytx rt e Ato:Ppwr fo sakadpaei i I. cin o od rm tc n lc t n P FasAfce:Nn lg fetd oe

sl a Btieaihei lf sit(aea sl iws rtmtc et hf sm s h) Sna: ytx sl a o,1 p sl a o,C p L o:rgse o mmr p eitr r eoy Ato:I oeadi 1 o =o < 1 cin f prn s , p p < I oeadi C,o =o < C f prn s L p p < L FasAfce:O,S,Z,A=,P,C lg fetd F F F F? F F

sr a Btieaihei rgtsit(ind iws rtmtc ih hf sge) Sna: ytx sr a o,1 p sr a o,C p L o:rgse o mmr p eitr r eoy Ato:I oeadi 1 sge o =o > 1(inetnso) cin f prn s , ind p p > sg xed p I oeadi C,sge o =o > C (inetnso) f prn s L ind p p > L sg xed p FasAfce:O,S,Z,A=,P,C lg fetd F F F F? F F

sb b Sbrc wt bro utat ih orw Sna: ytx sb b ds,sc et r ds:rgse o mmr et eitr r eoy sc rgse,mmr,o imdae r: eitr eoy r meit Ato:ds =ds -(r +C) cin et et sc F FasAfce:O,S,Z,A,P,C lg fetd F F F F F F Nts Ti isrcini ue t prom3-i sbrcin oe: hs ntuto s sd o efr 2bt utato.
ece425web.groups.et.by u.net/stable/labs/8086InstructionSet.html#mul 7/9

11/22/12

8086 Instruction Set

sl h Btielf sit(aea sl iws et hf sm s a) Sna: ytx sl h o,1 p sl h o,C p L o:rgse o mmr p eitr r eoy Ato:I oeadi 1 o =o < 1 cin f prn s , p p < I oeadi C,o =o < C f prn s L p p < L FasAfce:O,S,Z,A=,P,C lg fetd F F F F? F F

sr h Btiergtsit(nind iws ih hf usge) Sna: ytx sr h o,1 p sr h o,C p L o:rgse o mmr p eitr r eoy Ato:I oeadi 1 o =(nindo > 1 cin f prn s , p usge)p > I oeadi C,o =(nindo > C f prn s L p usge)p > L FasAfce:O,S,Z,A=,P,C lg fetd F F F F? F F

si t Stitrutfa (nbeitrut) e nerp lg eal nerps Sna: ytx si t Ato:StI cin e F FasAfce:I= lg fetd F1

sb u Sbrc tonmes utat w ubr Sna: ytx sb u ds,sc et r ds:rgie o mmr et estr r eoy sc rgse,mmr,o imdae r: eitr eoy r meit Ato:ds =ds -sc cin et et r FasAfce:O,S,Z,A,P,C lg fetd F F F F F F Nts Wrsfrbt sge adusge nmes oe: ok o oh ind n nind ubr.

ts et Btielgclcmae iws oia opr Sna: ytx ts et o1 o2 p, p o1 rgse,mmr,o imdae p: eitr eoy r meit o2 rgse,mmr,o imdae p: eitr eoy r meit Ato:Promo1&o2 dsadn tersl btstigtefas cin efr p p, icrig h eut u etn h lg. FasAfce:O=,S,Z,A=,P,C= lg fetd F0 F F F? F F0 Nts Ti isrcini ue t ts i bt o avleaest oe: hs ntuto s sd o et f is f au r e.

xr o BtielgclXR iws oia O Sna: ytx xr o ds,sc et r ds:rgse o mmr et eitr r eoy sc rgse,mmr,o imdae r: eitr eoy r meit Ato:ds =ds ^sc cin et et r FasAfce:O=,S,Z,A=,P,C= lg fetd F0 F F F? F F0

Last updated 15 July 2003, by wsf

ece425web.groups.et.by u.net/stable/labs/8086InstructionSet.html#mul

8/9

11/22/12

8086 Instruction Set

ece425web.groups.et.by u.net/stable/labs/8086InstructionSet.html#mul

9/9

You might also like