Beruflich Dokumente
Kultur Dokumente
8086/80186/80286/80386/80486InstructionSet
AAAAsciiAdjustforAddition
Usage:AAA
Modifiesflags:AFCF(OF,PF,SF,ZFundefined)
ChangescontentsofALtovalidunpackeddecimal.Thehighorder
nibbleiszeroed.
ClocksSize
Operands808x286386486Bytes
none83431
AADAsciiAdjustforDivision
Usage:AAD
Modifiesflags:SFZFPF(AF,CF,OFundefined)
Usedbeforedividingunpackeddecimalnumbers.MultipliesAHby
10andtheaddsresultintoAL.SetsAHtozero.Thisinstruction
isalsoknowntohaveanundocumentedbehavior.
AL:=10*AH+AL
AH:=0
ClocksSize
Operands808x286386486Bytes
none601419142
AAMAsciiAdjustforMultiplication
Usage:AAM
Modifiesflags:PFSFZF(AF,CF,OFundefined)
AH:=AL/10
AL:=ALmod10
Usedaftermultiplicationoftwounpackeddecimalnumbers,this
instructionadjustsanunpackeddecimalnumber.Thehighorder
nibbleofeachbytemustbezeroedbeforeusingthisinstruction.
Thisinstructionisalsoknowntohaveanundocumentedbehavior.
ClocksSize
Operands808x286386486Bytes
none831617152
AASAsciiAdjustforSubtraction
Usage:AAS
Modifiesflags:AFCF(OF,PF,SF,ZFundefined)
CorrectsresultofapreviousunpackeddecimalsubtractioninAL.
Highordernibbleiszeroed.
ClocksSize
Operands808x286386486Bytes
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 1/40
01/03/2017 Intel8086CPUFamilyArchitecture
none83431
ADCAddWithCarry
Usage:ADCdest,src
Modifiesflags:AFCFOFSFPFZF
Sumstwobinaryoperandsplacingtheresultinthedestination.
IfCFisset,a1isaddedtothedestination.
ClocksSize
Operands808x286386486Bytes
reg,reg32212
mem,reg16+EA77324(W88=24+EA)
reg,mem9+EA76224(W88=13+EA)
reg,immed432134
mem,immed17+EA77336(W88=23+EA)
accum,immed432123
ADDArithmeticAddition
Usage:ADDdest,src
Modifiesflags:AFCFOFPFSFZF
Adds"src"to"dest"andreplacingtheoriginalcontentsof"dest".
Bothoperandsarebinary.
ClocksSize
Operands808x286386486Bytes
reg,reg32212
mem,reg16+EA77324(W88=24+EA)
reg,mem9+EA76224(W88=13+EA)
reg,immed432134
mem,immed17+EA77336(W88=23+EA)
accum,immed432123
ANDLogicalAnd
Usage:ANDdest,src
Modifiesflags:CFOFPFSFZF(AFundefined)
PerformsalogicalANDofthetwooperandsreplacingthedestination
withtheresult.
ClocksSize
Operands808x286386486Bytes
reg,reg32212
mem,reg16+EA77324(W88=24+EA)
reg,mem9+EA76124(W88=13+EA)
reg,immed432134
mem,immed17+EA77336(W88=23+EA)
accum,immed432123
ARPLAdjustedRequestedPrivilegeLevelofSelector(286+PM)
Usage:ARPLdest,src
(286+protectedmode)
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 2/40
01/03/2017 Intel8086CPUFamilyArchitecture
Modifiesflags:ZF
ComparestheRPLbitsof"dest"against"src".IftheRPLbits
of"dest"arelessthan"src",thedestinationRPLbitsareset
equaltothesourceRPLbitsandtheZeroFlagisset.Otherwise
theZeroFlagiscleared.
ClocksSize
Operands808x286386486Bytes
reg,reg102092
mem,reg112194
BOUNDArrayIndexBoundCheck(80188+)
Usage:BOUNDsrc,limit
Modifiesflags:None
Arrayindexinsourceregisterischeckedagainstupperandlower
boundsinmemorysource.Thefirstwordlocatedat"limit"is
thelowerboundaryandthewordat"limit+2"istheupperarraybound.
Interrupt5occursifthesourcevalueislessthanorhigherthan
thesource.
ClocksSize
Operands808x286386486Bytes
reg16,mem32nj=13nj=1072
reg32,mem64nj=13nj=1072
nj=nojumptaken
BSFBitScanForward(386+)
Usage:BSFdest,src
Modifiesflags:ZF
Scanssourceoperandforfirstbitset.SetsZFifabitisfound
setandloadsthedestinationwithanindextofirstsetbit.Clears
ZFisnobitsarefoundset.BSFscansforwardacrossbitpattern
(0n)whileBSRscansinreverse(n0).
ClocksSize
Operands808x286386486Bytes
reg,reg10+3n6423
reg,mem10+3n74337
reg32,reg3210+3n64237
reg32,mem3210+3n74337
BSRBitScanReverse(386+)
Usage:BSRdest,src
Modifiesflags:ZF
Scanssourceoperandforfirstbitset.SetsZFifabitisfound
setandloadsthedestinationwithanindextofirstsetbit.Clears
ZFisnobitsarefoundset.BSFscansforwardacrossbitpattern
(0n)whileBSRscansinreverse(n0).
ClocksSize
Operands808x286386486Bytes
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 3/40
01/03/2017 Intel8086CPUFamilyArchitecture
reg,reg10+3n61033
reg,mem10+3n710437
reg32,reg3210+3n610337
reg32,mem3210+3n710437
BSWAPByteSwap(486+)
Usage:BSWAPreg32
Modifiesflags:none
Changesthebyteorderofa32bitregisterfrombigendianto
littleendianorviceversa.Resultleftindestinationregister
isundefinediftheoperandisa16bitregister.
ClocksSize
Operands808x286386486Bytes
reg3212
BTBitTest(386+)
Usage:BTdest,src
Modifiesflags:CF
Thedestinationbitindexedbythesourcevalueiscopiedintothe
CarryFlag.
ClocksSize
Operands808x286386486Bytes
reg16,immed83348
mem16,immed86648
reg16,reg163337
mem16,reg16121237
BTCBitTestwithCompliment(386+)
Usage:BTCdest,src
Modifiesflags:CF
Thedestinationbitindexedbythesourcevalueiscopiedintothe
CarryFlagafterbeingcomplimented(inverted).
ClocksSize
Operands808x286386486Bytes
reg16,immed86648
mem16,immed88848
reg16,reg166637
mem16,reg16131337
BTRBitTestwithReset(386+)
Usage:BTRdest,src
Modifiesflags:CF
Thedestinationbitindexedbythesourcevalueiscopiedintothe
CarryFlagandthenclearedinthedestination.
ClocksSize
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 4/40
01/03/2017 Intel8086CPUFamilyArchitecture
Operands808x286386486Bytes
reg16,immed86648
mem16,immed88848
reg16,reg166637
mem16,reg16131337
BTSBitTestandSet(386+)
Usage:BTSdest,src
Modifiesflags:CF
Thedestinationbitindexedbythesourcevalueiscopiedintothe
CarryFlagandthensetinthedestination.
ClocksSize
Operands808x286386486Bytes
reg16,immed86648
mem16,immed88848
reg16,reg166637
mem16,reg16131337
CALLProcedureCall
Usage:CALLdestination
Modifiesflags:None
PushesInstructionPointer(andCodeSegmentforfarcalls)onto
stackandloadsInstructionPointerwiththeaddressofprocname.
CodecontinueswithexecutionatCS:IP.
Clocks
Operands808x286386486
rel16(near,IPrelative)1977+m3
rel32(near,IPrelative)7+m3
reg16(near,registerindirect)1677+m5
reg32(near,registerindirect)7+m5
mem16(near,memoryindirect)21+EA1110+m5
mem32(near,memoryindirect)10+m5
ptr16:16(far,fullptrsupplied)281317+m18
ptr16:32(far,fullptrsupplied)17+m18
ptr16:16(far,ptrsupplied,prot.mode)2634+m20
ptr16:32(far,ptrsupplied,prot.mode)34+m20
m16:16(far,indirect)37+EA1622+m17
m16:32(far,indirect)22+m17
m16:16(far,indirect,prot.mode)2938+m20
m16:32(far,indirect,prot.mode)38+m20
ptr16:16(task,viaTSSortaskgate)177TS37+TS
m16:16(task,viaTSSortaskgate)180/1855+TS37+TS
m16:32(task)TS37+TS
m16:32(task)5+TS37+TS
ptr16:16(gate,sameprivilege)4152+m35
ptr16:32(gate,sameprivilege)52+m35
m16:16(gate,sameprivilege)4456+m35
m16:32(gate,sameprivilege)56+m35
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 5/40
01/03/2017 Intel8086CPUFamilyArchitecture
ptr16:16(gate,morepriv,noparm)8286+m69
ptr16:32(gate,morepriv,noparm)86+m69
m16:16(gate,morepriv,noparm)8390+m69
m16:32(gate,morepriv,noparm)90+m69
ptr16:16(gate,morepriv,xparms)86+4x94+4x+m77+4x
ptr16:32(gate,morepriv,xparms)94+4x+m77+4x
m16:16(gate,morepriv,xparms)90+4x98+4x+m77+4x
m16:32(gate,morepriv,xparms)98+4x+m77+4x
CBWConvertBytetoWord
Usage:CBW
Modifiesflags:None
ConvertsbyteinALtowordValueinAXbyextendingsignofAL
throughoutregisterAH.
ClocksSize
Operands808x286386486Bytes
none22331
CDQConvertDoubletoQuad(386+)
Usage:CDQ
Modifiesflags:None
ConvertssignedDWORDinEAXtoasignedquadwordinEDX:EAXby
extendingthehighorderbitofEAXthroughoutEDX
ClocksSize
Operands808x286386486Bytes
none231
CLCClearCarry
Usage:CLC
Modifiesflags:CF
ClearstheCarryFlag.
ClocksSize
Operands808x286386486Bytes
none22221
CLDClearDirectionFlag
Usage:CLD
Modifiesflags:DF
ClearstheDirectionFlagcausingstringinstructionstoincrement
theSIandDIindexregisters.
ClocksSize
Operands808x286386486Bytes
none22221
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 6/40
01/03/2017 Intel8086CPUFamilyArchitecture
CLIClearInterruptFlag(disable)
Usage:CLI
Modifiesflags:IF
DisablesthemaskablehardwareinterruptsbyclearingtheInterrupt
flag.NMI'sandsoftwareinterruptsarenotinhibited.
ClocksSize
Operands808x286386486Bytes
none22351
CLTSClearTaskSwitchedFlag(286+privileged)
Usage:CLTS
Modifiesflags:None
ClearstheTaskSwitchedFlagintheMachineStatusRegister.This
isaprivilegedoperationandisgenerallyusedonlybyoperating
systemcode.
ClocksSize
Operands808x286386486Bytes
none2572
CMCComplementCarryFlag
Usage:CMC
Modifiesflags:CF
Toggles(inverts)theCarryFlag
ClocksSize
Operands808x286386486Bytes
none22221
CMPCompare
Usage:CMPdest,src
Modifiesflags:AFCFOFPFSFZF
Subtractssourcefromdestinationandupdatestheflagsbutdoes
notsaveresult.Flagscansubsequentlybecheckedforconditions.
ClocksSize
Operands808x286386486Bytes
reg,reg32212
mem,reg9+EA75224(W88=13+EA)
reg,mem9+EA66224(W88=13+EA)
reg,immed432134
mem,immed10+EA65236(W88=14+EA)
accum,immed432123
CMPSCompareString(Byte,WordorDoubleword)
Usage:CMPSdest,src
CMPSB
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 7/40
01/03/2017 Intel8086CPUFamilyArchitecture
CMPSW
CMPSD(386+)
Modifiesflags:AFCFOFPFSFZF
Subtractsdestinationvaluefromsourcewithoutsavingresults.
Updatesflagsbasedonthesubtractionandtheindexregisters
(E)SIand(E)DIareincrementedordecrementeddependingonthe
stateoftheDirectionFlag.CMPSBinc/decrementstheindex
registersby1,CMPSWinc/decrementsby2,whileCMPSDincrements
ordecrementsby4.TheREPprefixescanbeusedtoprocess
entiredataitems.
ClocksSize
Operands808x286386486Bytes
dest,src2281081(W88=30)
CMPSXCHGCompareandExchange
Usage:CMPSXCHGdest,src(486+)
Modifiesflags:AFCFOFPFSFZF
Comparestheaccumulator(832bits)with"dest".Ifequalthe
"dest"isloadedwith"src",otherwisetheaccumulatorisloaded
with"dest".
ClocksSize
Operands808x286386486Bytes
reg,reg62
mem,reg72
add3clocksifthe"mem,reg"comparisonfails
CWDConvertWordtoDoubleword
Usage:CWD
Modifiesflags:None
ExtendssignofwordinregisterAXthroughoutregisterDXforming
adoublewordquantityinDX:AX.
ClocksSize
Operands808x286386486Bytes
none52231
CWDEConvertWordtoExtendedDoubleword(386+)
Usage:CWDE
Modifiesflags:None
ConvertsasignedwordinAXtoasigneddoublewordinEAXby
extendingthesignbitofAXthroughoutEAX.
ClocksSize
Operands808x286386486Bytes
none331
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 8/40
01/03/2017 Intel8086CPUFamilyArchitecture
DAADecimalAdjustforAddition
Usage:DAA
Modifiesflags:AFCFPFSFZF(OFundefined)
Correctsresult(inAL)ofapreviousBCDadditionoperation.
ContentsofALarechangedtoapairofpackeddecimaldigits.
ClocksSize
Operands808x286386486Bytes
none43421
DASDecimalAdjustforSubtraction
Usage:DAS
Modifiesflags:AFCFPFSFZF(OFundefined)
Correctsresult(inAL)ofapreviousBCDsubtractionoperation.
ContentsofALarechangedtoapairofpackeddecimaldigits.
ClocksSize
Operands808x286386486Bytes
none43421
DECDecrement
Usage:DECdest
Modifiesflags:AFOFPFSFZF
Unsignedbinarysubtractionofonefromthedestination.
ClocksSize
Operands808x286386486Bytes
reg832212
mem15+EA76324
reg16/3232211
DIVDivide
Usage:DIVsrc
Modifiesflags:(AF,CF,OF,PF,SF,ZFundefined)
Unsignedbinarydivisionofaccumulatorbysource.Ifthesource
divisorisabytevaluethenAXisdividedby"src"andthequotient
isplacedinALandtheremainderinAH.Ifsourceoperandisaword
value,thenDX:AXisdividedby"src"andthequotientisstoredinAX
andtheremainderinDX.
ClocksSize
Operands808x286386486Bytes
reg880901414162
reg161441622222242
reg3238402
mem8(8696)+EA17171624
mem16(150168)+EA25252424(W88=158176+EA)
mem32414024
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 9/40
01/03/2017 Intel8086CPUFamilyArchitecture
ENTERMakeStackFrame(80188+)
Usage:ENTERlocals,level
Modifiesflags:None
Modifiesstackforentrytoprocedureforhighlevellanguage.
Operand"locals"specifiestheamountofstoragetobeallocated
onthestack."Level"specifiesthenestingleveloftheroutine.
PairedwiththeLEAVEinstruction,thisisanefficientmethodof
entryandexittoprocedures.
ClocksSize
Operands808x286386486Bytes
immed16,01110144
immed16,11512174
immed16,immed812+4(n1)15+4(n1)17+3n4
ESCEscape
Usage:ESCimmed,src
Modifiesflags:None
Providesaccesstothedatabusforotherresidentprocessors.
TheCPUtreatsitasaNOPbutplacesmemoryoperandonbus.
ClocksSize
Operands808x286386486Bytes
immed,reg2920?2
immed,mem2920?24
HLTHaltCPU
Usage:HLT
Modifiesflags:None
HaltsCPUuntilRESETlineisactivated,NMIormaskableinterrupt
received.TheCPUbecomesdormantbutretainsthecurrentCS:IP
forlaterrestart.
ClocksSize
Operands808x286386486Bytes
none22541
IDIVSignedIntegerDivision
Usage:IDIVsrc
Modifiesflags:(AF,CF,OF,PF,SF,ZFundefined)
Signedbinarydivisionofaccumulatorbysource.Ifsourceisa
bytevalue,AXisdividedby"src"andthequotientisstoredin
ALandtheremainderinAH.Ifsourceisawordvalue,DX:AXis
dividedby"src",andthequotientisstoredinALandthe
remainderinDX.
ClocksSize
Operands808x286386486Bytes
reg81011121719192
reg161651842527272
reg3243432
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 10/40
01/03/2017 Intel8086CPUFamilyArchitecture
mem8(107118)+EA20222024
mem16(171190)+EA38302824(W88=175194)
mem32464424
IMULSignedMultiply
Usage:IMULsrc
IMULsrc,immed(286+)
IMULdest,src,immed8(286+)
IMULdest,src(386+)
Modifiesflags:CFOF(AF,PF,SF,ZFundefined)
Signedmultiplicationofaccumulatorby"src"withresultplaced
intheaccumulator.Ifthesourceoperandisabytevalue,it
ismultipliedbyALandtheresultstoredinAX.Ifthesource
operandisawordvalueitismultipliedbyAXandtheresultis
storedinDX:AX.Othervariationsofthisinstructionallow
specificationofsourceanddestinationregistersaswellasa
thirdimmediatefactor.
ClocksSize
Operands808x286386486Bytes
reg880981391413182
reg161281542192213262
reg3293812422
mem886104161217131824
mem16134160241225132624
mem321241134224
reg16,reg16922132635
reg32,reg32938134235
reg16,mem161225132635
reg32,mem321241134235
reg16,immed2192213263
reg32,immed21938134236
reg16,reg16,immed2922132636
reg32,reg32,immed21938134236
reg16,mem16,immed241225132636
reg32,mem32,immed241241134236
INInputByteorWordFromPort
Usage:INaccum,port
Modifiesflags:None
Abyte,wordordwordisreadfrom"port"andplacedinAL,AXor
EAXrespectively.Iftheportnumberisintherangeof0255
itcanbespecifiedasanimmediate,otherwisetheportnumber
mustbespecifiedinDX.ValidportrangesonthePCare01024,
thoughvaluesthrough65535maybespecifiedandrecognizedby
thirdpartyvendorsandPS/2's.
ClocksSize
Operands808x286386486Bytes
accum,immed810/14512142
accum,immed8(PM)6/268/28/272
accum,DX8/12513141
accum,DX(PM)7/278/28/271
386+protectedmodetimingsdependonprivilegelevels.
firstnumberisthetimingif:CPLIOPL
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 11/40
01/03/2017 Intel8086CPUFamilyArchitecture
secondnumberisthetimingif:CPL>IOPLorinVM86mode(386)
CPLIOPL(486)
thirdnumberisthetimingwhen:virtualmodeon486processor
486virtualmodealwaysrequires27cycles
INCIncrement
Usage:INCdest
Modifiesflags:AFOFPFSFZF
Addsonetodestinationunsignedbinaryoperand.
ClocksSize
Operands808x286386486Bytes
reg832212
reg1632211
reg3232211
mem15+EA76324(W88=23+EA)
INSInputStringfromPort(80188+)
Usage:INSdest,port
INSB
INSW
INSD(386+)
Modifiesflags:None
LoadsdatafromporttothedestinationES:(E)DI(evenifa
destinationoperandissupplied).(E)DIisadjustedbythesize
oftheoperandandincreasediftheDirectionFlagisclearedand
decreasediftheDirectionFlagisset.ForINSB,INSW,INSDno
operandsareallowedandthesizeisdeterminedbythemnemonic.
ClocksSize
Operands808x286386486Bytes
dest,port515171
dest,port(PM)59/2910/32/301
none515171
none(PM)59/2910/32/301
386+protectedmodetimingsdependonprivilegelevels.
firstnumberisthetimingif:CPLIOPL
secondnumberisthetimingif:CPL>IOPL
thirdnumberisthetimingif:virtualmodeon486processor
INTInterrupt
Usage:INTnum
Modifiesflags:TFIF
Initiatesasoftwareinterruptbypushingtheflags,clearingthe
TrapandInterruptFlags,pushingCSfollowedbyIPandloading
CS:IPwiththevaluefoundintheinterruptvectortable.Execution
thenbeginsatthelocationaddressedbythenewCS:IP
ClocksSize
Operands808x286386486Bytes
3(constant)52/7223+m33262
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 12/40
01/03/2017 Intel8086CPUFamilyArchitecture
3(prot.mode,samepriv.)40+m59442
3(prot.mode,morepriv.)78+m99712
3(fromVM86toPL0)119822
3(prot.modeviataskgate)167+mTS37+TS2
immed851/7123+m37301
immed8(prot.mode,samepriv.)40+m59441
immed8(prot.mode,morepriv.)78+m99711
immed8(fromVM86toPL0)119861
immed8(prot.mode,viataskgate)167+mTS37+TS1
INTOInterruptonOverflow
Usage:INTO
Modifiesflags:IFTF
IftheOverflowFlagissetthisinstructiongeneratesanINT4
whichcausesthecodeaddressedby0000:0010tobeexecuted.
ClocksSize
Operands808x286386486Bytes
none:jump53/7324+m35281
nojump4333
(prot.mode,samepriv.)59461
(prot.mode,morepriv.)99731
(fromVM86toPL0)119841
(prot.mode,viataskgate)TS39+TS1
INVDInvalidateCache(486+)
Usage:INVD
Modifiesflags:none
FlushesCPUinternalcache.Issuesspecialfunctionbuscycle
whichindicatestoflushexternalcaches.Datainwriteback
externalcachesislost.
ClocksSize
Operands808x286386486Bytes
none42
INVLPGInvalidateTranslationLookAsideBufferEntry(486+)
Usage:INVLPG
Modifiesflags:none
InvalidatesasinglepagetableentryintheTranslation
LookAsideBuffer.Intelwarnsthatthisinstructionmaybe
implementeddifferentlyonfutureprocessors.
ClocksSize
Operands808x286386486Bytes
none122
timingisforTLBentryhitonly.
IRET/IRETDInterruptReturn
Usage:IRET
IRETD(386+)
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 13/40
01/03/2017 Intel8086CPUFamilyArchitecture
Modifiesflags:AFCFDFIFPFSFTFZF
ReturnscontroltopointofinterruptionbypoppingIP,CS
andthentheFlagsfromthestackandcontinuesexecutionat
thislocation.CPUexceptioninterruptswillreturntothe
instructionthatcausetheexceptionbecausetheCS:IPplaced
onthestackduringtheinterruptistheaddressoftheoffending
instruction.
ClocksSize
Operands808x286386486Bytes
iret32/4417+m22151
iret(prot.mode)31+m38151
iret(tolessprivilege)55+m82361
iret(differenttask,NT=1)169+mTSTS+321
iretd22/38151
iretd(tolessprivilege)82361
iretd(toVM86mode)60151
iretd(differenttask,NT=1)TSTS+321
386timingsarelistedasrealmode/protectedmode
JxxJumpInstructionsTable
MnemonicMeaningJumpCondition
JAJumpifAboveCF=0andZF=0
JAEJumpifAboveorEqualCF=0
JBJumpifBelowCF=1
JBEJumpifBeloworEqualCF=1orZF=1
JCJumpifCarryCF=1
JCXZJumpifCXZeroCX=0
JEJumpifEqualZF=1
JGJumpifGreater(signed)ZF=0andSF=OF
JGEJumpifGreaterorEqual(signed)SF=OF
JLJumpifLess(signed)SF!=OF
JLEJumpifLessorEqual(signed)ZF=1orSF!=OF
JMPUnconditionalJumpunconditional
JNAJumpifNotAboveCF=1orZF=1
JNAEJumpifNotAboveorEqualCF=1
JNBJumpifNotBelowCF=0
JNBEJumpifNotBeloworEqualCF=0andZF=0
JNCJumpifNotCarryCF=0
JNEJumpifNotEqualZF=0
JNGJumpifNotGreater(signed)ZF=1orSF!=OF
JNGEJumpifNotGreaterorEqual(signed)SF!=OF
JNLJumpifNotLess(signed)SF=OF
JNLEJumpifNotLessorEqual(signed)ZF=0andSF=OF
JNOJumpifNotOverflow(signed)OF=0
JNPJumpifNoParityPF=0
JNSJumpifNotSigned(signed)SF=0
JNZJumpifNotZeroZF=0
JOJumpifOverflow(signed)OF=1
JPJumpifParityPF=1
JPEJumpifParityEvenPF=1
JPOJumpifParityOddPF=0
JSJumpifSigned(signed)SF=1
JZJumpifZeroZF=1
ClocksSize
Operands808x286386486Bytes
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 14/40
01/03/2017 Intel8086CPUFamilyArchitecture
Jx:jump167+m7+m32
nojump4331
Jxnearlabel7+m34
nojump31
It'sagoodprogrammingpracticetoorganizecodesothe
expectedcaseisexecutedwithoutajumpsincetheactual
jumptakeslongertoexecutethanfallingthroughthetest.
seeJCXZandJMPfortheirrespectivetimings
JCXZ/JECXZJumpifRegister(E)CXisZero
Usage:JCXZlabel
JECXZlabel(386+)
Modifiesflags:None
Causesexecutiontobranchto"label"ifregisterCXiszero.Uses
unsignedcomparision.
ClocksSize
Operands808x286386486Bytes
label:jump188+m9+m82
nojump6455
JMPUnconditionalJump
Usage:JMPtarget
Modifiesflags:None
Unconditionallytransferscontrolto"label".Jumpsbydefault
arewithin32768to32767bytesfromtheinstructionfollowing
thejump.NEARandSHORTjumpscausetheIPtobeupdatedwhileFAR
jumpscauseCSandIPtobeupdated.
Clocks
Operands808x286386486
rel8(relative)157+m7+m3
rel16(relative)157+m7+m3
rel32(relative)7+m3
reg16(near,registerindirect)117+m7+m5
reg32(near,registerindirect)7+m5
mem16(near,memindirect)18+EA11+m10+m5
mem32(near,memindirect)24+EA15+m10+m5
ptr16:16(far,dwordimmed)12+m17
ptr16:16(far,PMdwordimmed)27+m19
ptr16:16(callgate,samepriv.)38+m45+m32
ptr16:16(viaTSS)175+mTS42+TS
ptr16:16(viataskgate)180+mTS43+TS
mem16:16(far,indirect)43+m13
mem16:16(far,PMindirect)31+m18
mem16:16(callgate,samepriv.)41+m49+m31
mem16:16(viaTSS)178+m5+TS41+TS
mem16:16(viataskgate)183+m5+TS42+TS
ptr16:32(far,6byteimmed)12+m13
ptr16:32(far,PM6byteimmed)27+m18
ptr16:32(callgate,samepriv.)45+m31
ptr16:32(viaTSS)TS42+TS
ptr16:32(viataskstate)TS43+TS
m16:32(far,addressatdword)43+m13
m16:32(far,addressatdword)31+m18
m16:32(callgate,samepriv.)49+m31
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 15/40
01/03/2017 Intel8086CPUFamilyArchitecture
m16:32(viaTSS)5+TS41+TS
m16:32(viataskstate)5+TS42+TS
LAHFLoadRegisterAHFromFlags
Usage:LAHF
Modifiesflags:None
Copiesbits07oftheflagsregisterintoAH.Thisincludesflags
AF,CF,PF,SFandZFotherbitsareundefined.
AH:=SFZFxxAFxxPFxxCF
ClocksSize
Operands808x286386486Bytes
none42231
LARLoadAccessRights(286+protected)
Usage:LARdest,src
Modifiesflags:ZF
Thehighbyteoftheofthedestinationregisterisoverwrittenby
thevalueoftheaccessrightsbyteandtheloworderbyteiszeroed
dependingontheselectioninthesourceoperand.TheZeroFlagis
setiftheloadoperationissuccessful.
ClocksSize
Operands808x286386486Bytes
reg16,reg161415113
reg32,reg3215113
reg16,mem1616161137
reg32,mem32161137
LDSLoadPointerUsingDS
Usage:LDSdest,src
Modifiesflags:None
Loads32bitpointerfrommemorysourcetodestinationregister
andDS.Theoffsetisplacedinthedestinationregisterandthe
segmentisplacedinDS.Tousethisinstructionthewordatthe
lowermemoryaddressmustcontaintheoffsetandthewordatthe
higheraddressmustcontainthesegment.Thissimplifiestheloading
offarpointersfromthestackandtheinterruptvectortable.
ClocksSize
Operands808x286386486Bytes
reg16,mem3216+EA77624
reg,mem(PM)221257
LEALoadEffectiveAddress
Usage:LEAdest,src
Modifiesflags:None
Transfersoffsetaddressof"src"tothedestinationregister.
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 16/40
01/03/2017 Intel8086CPUFamilyArchitecture
ClocksSize
Operands808x286386486Bytes
reg,mem2+EA32124
theMOVinstructioncanoftensaveclockcycleswhenusedin
placeofLEAon8088processors
LEAVERestoreStackforProcedureExit(80188+)
Usage:LEAVE
Modifiesflags:None
ReleasesthelocalvariablescreatedbythepreviousENTER
instructionbyrestoringSPandBPtotheirconditionbefore
theprocedurestackframewasinitialized.
ClocksSize
Operands808x286386486Bytes
none5451
LESLoadPointerUsingES
Usage:LESdest,src
Modifiesflags:None
Loads32bitpointerfrommemorysourcetodestinationregister
andES.Theoffsetisplacedinthedestinationregisterandthe
segmentisplacedinES.Tousethisinstructionthewordatthe
lowermemoryaddressmustcontaintheoffsetandthewordatthe
higheraddressmustcontainthesegment.Thissimplifiestheloading
offarpointersfromthestackandtheinterruptvectortable.
ClocksSize
Operands808x286386486Bytes
reg,mem16+EA77624(W88=24+EA)
reg,mem(PM)221257
LFSLoadPointerUsingFS(386+)
Usage:LFSdest,src
Modifiesflags:None
Loads32bitpointerfrommemorysourcetodestinationregister
andFS.Theoffsetisplacedinthedestinationregisterandthe
segmentisplacedinFS.Tousethisinstructionthewordatthe
lowermemoryaddressmustcontaintheoffsetandthewordatthe
higheraddressmustcontainthesegment.Thissimplifiestheloading
offarpointersfromthestackandtheinterruptvectortable.
ClocksSize
Operands808x286386486Bytes
reg,mem7657
reg,mem(PM)221257
LGDTLoadGlobalDescriptorTable(286+privileged)
Usage:LGDTsrc
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 17/40
01/03/2017 Intel8086CPUFamilyArchitecture
Modifiesflags:None
LoadsavaluefromanoperandintotheGlobalDescriptorTable
(GDT)register.
ClocksSize
Operands808x286386486Bytes
mem641111115
LIDTLoadInterruptDescriptorTable(286+privileged)
Usage:LIDTsrc
Modifiesflags:None
LoadsavaluefromanoperandintotheInterruptDescriptorTable
(IDT)register.
ClocksSize
Operands808x286386486Bytes
mem641211115
LGSLoadPointerUsingGS(386+)
Usage:LGSdest,src
Modifiesflags:None
Loads32bitpointerfrommemorysourcetodestinationregister
andGS.Theoffsetisplacedinthedestinationregisterandthe
segmentisplacedinGS.Tousethisinstructionthewordatthe
lowermemoryaddressmustcontaintheoffsetandthewordatthe
higheraddressmustcontainthesegment.Thissimplifiestheloading
offarpointersfromthestackandtheinterruptvectortable.
ClocksSize
Operands808x286386486Bytes
reg,mem7657
reg,mem(PM)221257
LLDTLoadLocalDescriptorTable(286+privileged)
Usage:LLDTsrc
Modifiesflags:None
LoadsavaluefromanoperandintotheLocalDescriptorTable
Register(LDTR).
ClocksSize
Operands808x286386486Bytes
reg161720113
mem161924115
LMSWLoadMachineStatusWord(286+privileged)
Usage:LMSWsrc
Modifiesflags:None
LoadstheMachineStatusWord(MSW)fromdatafoundat"src"
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 18/40
01/03/2017 Intel8086CPUFamilyArchitecture
ClocksSize
Operands808x286386486Bytes
reg16310133
mem16613135
LOCKLockBus
Usage:LOCK
LOCK:(386+prefix)
Modifiesflags:None
ThisinstructionisaprefixthatcausestheCPUassertbuslock
signalduringtheexecutionofthenextinstruction.Usedto
avoidtwoprocessorsfromupdatingthesamedatalocation.The
286alwaysassertslockduringanXCHGwithmemoryoperands.This
shouldonlybeusedtolockthebuspriortoXCHG,MOV,INand
OUTinstructions.
ClocksSize
Operands808x286386486Bytes
none20011
LODSLoadString(Byte,WordorDouble)
Usage:LODSsrc
LODSB
LODSW
LODSD(386+)
Modifiesflags:None
TransfersstringelementaddressedbyDS:SI(evenifanoperandis
supplied)totheaccumulator.SIisincrementedbasedonthesize
oftheoperandorbasedontheinstructionused.IftheDirection
FlagissetSIisdecremented,iftheDirectionFlagisclearSI
isincremented.UsewithREPprefixes.
ClocksSize
Operands808x286386486Bytes
src12/165551
LOOPDecrementCXandLoopifCXNotZero
Usage:LOOPlabel
Modifiesflags:None
DecrementsCXby1andtransferscontrolto"label"ifCXisnot
Zero.The"label"operandmustbewithin128or127bytesofthe
instructionfollowingtheloopinstruction
ClocksSize
Operands808x286386486Bytes
label:jump188+m11+m62
nojump54?2
LOOPE/LOOPZLoopWhileEqual/LoopWhileZero
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 19/40
01/03/2017 Intel8086CPUFamilyArchitecture
Usage:LOOPElabel
LOOPZlabel
Modifiesflags:None
DecrementsCXby1(withoutmodifyingtheflags)andtransfers
controlto"label"ifCX!=0andtheZeroFlagisset.The
"label"operandmustbewithin128or127bytesoftheinstruction
followingtheloopinstruction.
ClocksSize
Operands808x286386486Bytes
label:jump188+m11+m92
nojump54?6
LOOPNZ/LOOPNELoopWhileNotZero/LoopWhileNotEqual
Usage:LOOPNZlabel
LOOPNElabel
Modifiesflags:None
DecrementsCXby1(withoutmodifyingtheflags)andtransfers
controlto"label"ifCX!=0andtheZeroFlagisclear.The
"label"operandmustbewithin128or127bytesoftheinstruction
followingtheloopinstruction.
ClocksSize
Operands808x286386486Bytes
label:jump198+m11+m92
nojump54?6
LSLLoadSegmentLimit(286+protected)
Usage:LSLdest,src
Modifiesflags:ZF
Loadsthesegmentlimitofaselectorintothedestinationregister
iftheselectorisvalidandvisibleatthecurrentprivilegelevel.
IfloadingissuccessfultheZeroFlagisset,otherwiseitis
cleared.
ClocksSize
Operands808x286386486Bytes
reg16,reg161420/25103
reg32,reg3220/25103
reg16,mem161621/26105
reg32,mem3221/26105
386timesarelisted"bytegranular"/"pagegranular"
LSSLoadPointerUsingSS(386+)
Usage:LSSdest,src
Modifiesflags:None
Loads32bitpointerfrommemorysourcetodestinationregister
andSS.Theoffsetisplacedinthedestinationregisterandthe
segmentisplacedinSS.Tousethisinstructionthewordatthe
lowermemoryaddressmustcontaintheoffsetandthewordatthe
higheraddressmustcontainthesegment.Thissimplifiestheloading
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 20/40
01/03/2017 Intel8086CPUFamilyArchitecture
offarpointersfromthestackandtheinterruptvectortable.
ClocksSize
Operands808x286386486Bytes
reg,mem7657
reg,mem(PM)221257
LTRLoadTaskRegister(286+privileged)
Usage:LTRsrc
Modifiesflags:None
Loadsthecurrenttaskregisterwiththevaluespecifiedin"src".
ClocksSize
Operands808x286386486Bytes
reg161723203
mem161927205
MOVMoveByteorWord
Usage:MOVdest,src
Modifiesflags:None
Copiesbyteorwordfromthesourceoperandtothedestination
operand.IfthedestinationisSSinterruptsaredisabledexcept
onearlybuggy808xCPUs.SomeCPUsdisableinterruptsifthe
destinationisanyofthesegmentregisters
ClocksSize
Operands808x286386486Bytes
reg,reg22212
mem,reg9+EA32124(W88=13+EA)
reg,mem8+EA54124(W88=12+EA)
mem,immed10+EA32136(W88=14+EA)
reg,immed422123
mem,accum103213(W88=14)
accum,mem105413(W88=14)
segreg,reg1622232
segreg,mem168+EA55924(W88=12+EA)
reg16,segreg22232
mem16,segreg9+EA32324(W88=13+EA)
reg32,CR0/CR2/CR364
CR0,reg321016
CR2,reg32443
CR3,reg32543
reg32,DR0/DR1/DR2/DR322103
reg32,DR6/DR722103
DR0/DR1/DR2/DR3,reg3222113
DR6/DR7,reg3216113
reg32,TR6/TR71243
TR6/TR7,reg321243
reg32,TR33
TR3,reg326
whenthe386specialregistersareusedalloperandsare32bits
MOVSMoveString(ByteorWord)
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 21/40
01/03/2017 Intel8086CPUFamilyArchitecture
Usage:MOVSdest,src
MOVSB
MOVSW
MOVSD(386+)
Modifiesflags:None
CopiesdatafromaddressedbyDS:SI(evenifoperandsaregiven)to
thelocationES:DIdestinationandupdatesSIandDIbasedonthe
sizeoftheoperandorinstructionused.SIandDIareincremented
whentheDirectionFlagisclearedanddecrementedwhentheDirection
FlagisSet.UsewithREPprefixes.
ClocksSize
Operands808x286386486Bytes
dest,src185771(W88=26)
MOVSXMovewithSignExtend(386+)
Usage:MOVSXdest,src
Modifiesflags:None
Copiesthevalueofthesourceoperandtothedestinationregister
withthesignextended.
ClocksSize
Operands808x286386486Bytes
reg,reg333
reg,mem6337
MOVZXMovewithZeroExtend(386+)
Usage:MOVZXdest,src
Modifiesflags:None
Copiesthevalueofthesourceoperandtothedestinationregister
withthezeroesextended.
ClocksSize
Operands808x286386486Bytes
reg,reg333
reg,mem6337
MULUnsignedMultiply
Usage:MULsrc
Modifiesflags:CFOF(AF,PF,SF,ZFundefined)
Unsignedmultiplyoftheaccumulatorbythesource.If"src"is
abytevalue,thenALisusedastheothermultiplicandandthe
resultisplacedinAX.If"src"isawordvalue,thenAXis
multipliedby"src"andDX:AXreceivestheresult.If"src"is
adoublewordvalue,thenEAXismultipliedby"src"andEDX:EAX
receivestheresult.The386+usesanearlyoutalgorithmwhich
makesmultiplyinganysizevalueinEAXasfastasinthe8or16
bitregisters.
ClocksSize
Operands808x286386486Bytes
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 22/40
01/03/2017 Intel8086CPUFamilyArchitecture
reg870771391413182
reg161181132192213262
reg32938134224
mem8(7683)+EA161217131824
mem16(124139)+EA241225132624
mem321221134224
NEGTwo'sComplementNegation
Usage:NEGdest
Modifiesflags:AFCFOFPFSFZF
Subtractsthedestinationfrom0andsavesthe2scomplementof
"dest"backinto"dest".
ClocksSize
Operands808x286386486Bytes
reg32212
mem16+EA76324(W88=24+EA)
NOPNoOperation(90h)
Usage:NOP
Modifiesflags:None
Thisisadonothinginstruction.Itresultsinoccupationofboth
spaceandtimeandismostusefulforpatchingcodesegments.
(ThisistheoriginalXCHGAL,ALinstruction)
ClocksSize
Operands808x286386486Bytes
none33311
NOTOne'sComplimentNegation(LogicalNOT)
Usage:NOTdest
Modifiesflags:None
Invertsthebitsofthe"dest"operandformingthe1scomplement.
ClocksSize
Operands808x286386486Bytes
reg32212
mem16+EA76324(W88=24+EA)
ORInclusiveLogicalOR
Usage:ORdest,src
Modifiesflags:CFOFPFSFZF(AFundefined)
LogicalinclusiveORofthetwooperandsreturningtheresultin
thedestination.Anybitsetineitheroperandwillbesetinthe
destination.
ClocksSize
Operands808x286386486Bytes
reg,reg32212
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 23/40
01/03/2017 Intel8086CPUFamilyArchitecture
mem,reg16+EA77324(W88=24+EA)
reg,mem9+EA76224(W88=13+EA)
reg,immed432134
mem8,immed817+EA77336
mem16,immed1625+EA77336
accum,immed432123
OUTOutputDatatoPort
Usage:OUTport,accum
Modifiesflags:None
TransfersbyteinAL,wordinAXordwordinEAXtothespecified
hardwareportaddress.Iftheportnumberisintherangeof0255
itcanbespecifiedasanimmediate.Ifgreaterthan255thenthe
portnumbermustbespecifiedinDX.SincethePConlydecodes10
bitsoftheportaddress,valuesover1023canonlybedecodedby
thirdpartyvendorequipmentandalsomaptotheportrange01023.
ClocksSize
Operands808x286386486Bytes
immed8,accum10/14310162
immed8,accum(PM)4/2411/31/292
DX,accum8/12311161
DX,accum(PM)5/2510/30/291
386+protectedmodetimingsdependonprivilegelevels.
firstnumberisthetimingwhen:CPLIOPL
secondnumberisthetimingwhen:CPL>IOPL
thirdnumberisthetimingwhen:virtualmodeon486processor
OUTSOutputStringtoPort(80188+)
Usage:OUTSport,src
OUTSB
OUTSW
OUTSD(386+)
Modifiesflags:None
Transfersabyte,wordordoublewordfrom"src"tothehardware
portspecifiedinDX.Forinstructionswithnooperandsthe"src"
islocatedatDS:SIandSIisincrementedordecrementedbythe
sizeoftheoperandorthesizedictatedbytheinstructionformat.
WhentheDirectionFlagissetSIisdecremented,whenclear,SIis
incremented.Iftheportnumberisintherangeof0255itcan
bespecifiedasanimmediate.Ifgreaterthan255thentheport
numbermustbespecifiedinDX.SincethePConlydecodes10bits
oftheportaddress,valuesover1023canonlybedecodedbythird
partyvendorequipmentandalsomaptotheportrange01023.
ClocksSize
Operands808x286386486Bytes
port,src514171
port,src(PM)8/2810/32/301
386+protectedmodetimingsdependonprivilegelevels.
firstnumberisthetimingwhen:CPLIOPL
secondnumberisthetimingwhen:CPL>IOPL
thirdnumberisthetimingwhen:virtualmodeon486processor
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 24/40
01/03/2017 Intel8086CPUFamilyArchitecture
POPPopWordoffStack
Usage:POPdest
Modifiesflags:None
Transferswordatthecurrentstacktop(SS:SP)tothedestination
thenincrementsSPbytwotopointtothenewstacktop.CSisnot
avaliddestination.
ClocksSize
Operands808x286386486Bytes
reg1685441
reg32441
segreg85731
mem1617+EA55624
mem325624
POPA/POPADPopAllRegistersontoStack(80188+)
Usage:POPA
POPAD(386+)
Modifiesflags:None
Popsthetop8wordsoffthestackintothe8generalpurpose16/32
bitregisters.Registersarepoppedinthefollowingorder:(E)DI,
(E)SI,(E)BP,(E)SP,(E)DX,(E)CXand(E)AX.The(E)SPvaluepopped
fromthestackisactuallydiscarded.
ClocksSize
Operands808x286386486Bytes
none192491
POPF/POPFDPopFlagsoffStack
Usage:POPF
POPFD(386+)
Modifiesflags:allflags
Popsword/doublewordfromstackintotheFlagsRegisterandthen
incrementsSPby2(forPOPF)or4(forPOPFD).
ClocksSize
Operands808x286386486Bytes
none8/125591(W88=12)
none(PM)561
PUSHPushWordontoStack
Usage:PUSHsrc
PUSHimmed(80188+only)
Modifiesflags:None
DecrementsSPbythesizeoftheoperand(twoorfour,bytevalues
aresignextended)andtransfersonewordfromsourcetothestack
top(SS:SP).
ClocksSize
Operands808x286386486Bytes
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 25/40
01/03/2017 Intel8086CPUFamilyArchitecture
reg1611/153211
reg32211
mem1616+EA55424(W88=24+EA)
mem325424
segreg10/143231
immed32123
PUSHA/PUSHADPushAllRegistersontoStack(80188+)
Usage:PUSHA
PUSHAD(386+)
Modifiesflags:None
Pushesallgeneralpurposeregistersontothestackinthefollowing
order:(E)AX,(E)CX,(E)DX,(E)BX,(E)SP,(E)BP,(E)SI,(E)DI.The
valueofSPisthevaluebeforetheactualpushofSP.
ClocksSize
Operands808x286386486Bytes
none1924111
PUSHF/PUSHFDPushFlagsontoStack
Usage:PUSHF
PUSHFD(386+)
Modifiesflags:None
TransferstheFlagsRegisterontothestack.PUSHFsavesa16bit
valuewhilePUSHFDsavesa32bitvalue.
ClocksSize
Operands808x286386486Bytes
none10/143441
none(PM)431
RCLRotateThroughCarryLeft
Usage:RCLdest,count
Modifiesflags:CFOF
C<7<0<
Rotatesthebitsinthedestinationtotheleft"count"timeswith
alldatapushedouttheleftsidereenteringontheright.The
CarryFlagholdsthelastbitrotatedout.
ClocksSize
Operands808x286386486Bytes
reg,122932
mem,115+EA710424(W88=23+EA)
reg,CL8+4n5+n98302
mem,CL20+EA+4n8+n1093124(W88=28+EA+4n)
reg,immed85+n98303
mem,immed88+n1093135
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 26/40
01/03/2017 Intel8086CPUFamilyArchitecture
RCRRotateThroughCarryRight
Usage:RCRdest,count
Modifiesflags:CFOF
>7>0>C
Rotatesthebitsinthedestinationtotheright"count"timeswith
alldatapushedouttherightsidereenteringontheleft.The
CarryFlagholdsthelastbitrotatedout.
ClocksSize
Operands808x286386486Bytes
reg,122932
mem,115+EA710424(W88=23+EA)
reg,CL8+4n5+n98302
mem,CL20+EA+4n8+n1093124(W88=28+EA+4n)
reg,immed85+n98303
mem,immed88+n1093135
REPRepeatStringOperation
Usage:REP
Modifiesflags:None
RepeatsexecutionofstringinstructionswhileCX!=0.After
eachstringoperation,CXisdecrementedandtheZeroFlagis
tested.Thecombinationofarepeatprefixandasegmentoverride
onCPU'sbeforethe386mayresultinerrorsifaninterruptoccurs
beforeCX=0.Thefollowingcodeshowscodethatissusceptibleto
thisandhowtoavoidit:
again:repmovsbyteptrES:[DI],ES:[SI];vulnerableinstr.
jcxznext;continueifREPsuccessful
loopagain;interruptgoofedcount
next:
ClocksSize
Operands808x286386486Bytes
none2221
REPE/REPZRepeatEqual/RepeatZero
Usage:REPE
REPZ
Modifiesflags:None
RepeatsexecutionofstringinstructionswhileCX!=0andtheZero
Flagisset.CXisdecrementedandtheZeroFlagtestedafter
eachstringoperation.Thecombinationofarepeatprefixanda
segmentoverrideonprocessorsotherthanthe386mayresultin
errorsifaninterruptoccursbeforeCX=0.
ClocksSize
Operands808x286386486Bytes
none2221
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 27/40
01/03/2017 Intel8086CPUFamilyArchitecture
REPNE/REPNZRepeatNotEqual/RepeatNotZero
Usage:REPNE
REPNZ
Modifiesflags:None
RepeatsexecutionofstringinstructionswhileCX!=0andtheZero
Flagisclear.CXisdecrementedandtheZeroFlagtestedafter
eachstringoperation.Thecombinationofarepeatprefixanda
segmentoverrideonprocessorsotherthanthe386mayresultin
errorsifaninterruptoccursbeforeCX=0.
ClocksSize
Operands808x286386486Bytes
none2221
RET/RETFReturnFromProcedure
Usage:RETnBytes
RETFnBytes
RETNnBytes
Modifiesflags:None
Transferscontrolfromaprocedurebacktotheinstructionaddress
savedonthestack."nbytes"isanoptionalnumberofbytesto
release.FarreturnspoptheIPfollowedbytheCS,whilenear
returnspoponlytheIPregister.
ClocksSize
Operands808x286386486Bytes
retn16/2011+m10+m51
retnimmed20/2411+m10+m53
retf26/3415+m18+m131
retf(PM,samepriv.)32+m181
retf(PM,lesserpriv.)68331
retfimmed25/3315+m18+m143
retfimmed(PM,samepriv.)32+m171
retfimmed(PM,lesserpriv.)68331
ROLRotateLeft
Usage:ROLdest,count
Modifiesflags:CFOF
C<7<0<
Rotatesthebitsinthedestinationtotheleft"count"timeswith
alldatapushedouttheleftsidereenteringontheright.The
CarryFlagwillcontainthevalueofthelastbitrotatedout.
ClocksSize
Operands808x286386486Bytes
reg,122332
mem,115+EA77424(W88=23+EA)
reg,CL8+4n5+n332
mem,CL20+EA+4n8+n7424(W88=28+EA+4n)
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 28/40
01/03/2017 Intel8086CPUFamilyArchitecture
reg,immed85+n323
mem,immed88+n7435
RORRotateRight
Usage:RORdest,count
Modifiesflags:CFOF
>7>0>C
Rotatesthebitsinthedestinationtotheright"count"timeswith
alldatapushedouttherightsidereenteringontheleft.The
CarryFlagwillcontainthevalueofthelastbitrotatedout.
ClocksSize
Operands808x286386486Bytes
reg,122332
mem,115+EA77424(W88=23+EA)
reg,CL8+4n5+n332
mem,CL20+EA+4n8+n7424(W88=28+EA+4n)
reg,immed85+n323
mem,immed88+n7435
SAHFStoreAHRegisterintoFLAGS
Usage:SAHF
Modifiesflags:AFCFPFSFZF
Transfersbits07ofAHintotheFlagsRegister.Thisincludes
AF,CF,PF,SFandZF.
ClocksSize
Operands808x286386486Bytes
none42321
SAL/SHLShiftArithmeticLeft/ShiftLogicalLeft
Usage:SALdest,count
SHLdest,count
Modifiesflags:CFOFPFSFZF(AFundefined)
C<7<0<0
Shiftsthedestinationleftby"count"bitswithzeroesshifted
inonright.TheCarryFlagcontainsthelastbitshiftedout.
ClocksSize
Operands808x286386486Bytes
reg,122332
mem,115+EA77424(W88=23+EA)
reg,CL8+4n5+n332
mem,CL20+EA+4n8+n7424(W88=28+EA+4n)
reg,immed85+n323
mem,immed88+n7435
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 29/40
01/03/2017 Intel8086CPUFamilyArchitecture
SARShiftArithmeticRight
Usage:SARdest,count
Modifiesflags:CFOFPFSFZF(AFundefined)
7>0>C
^
Shiftsthedestinationrightby"count"bitswiththecurrentsign
bitreplicatedintheleftmostbit.TheCarryFlagcontainsthe
lastbitshiftedout.
ClocksSize
Operands808x286386486Bytes
reg,122332
mem,115+EA77424(W88=23+EA)
reg,CL8+4n5+n332
mem,CL20+EA+4n8+n7424(W88=28+EA+4n)
reg,immed85+n323
mem,immed88+n7435
SBBSubtractwithBorrow/Carry
Usage:SBBdest,src
Modifiesflags:AFCFOFPFSFZF
Subtractsthesourcefromthedestination,andsubtracts1extraif
theCarryFlagisset.Resultsarereturnedin"dest".
ClocksSize
Operands808x286386486Bytes
reg,reg32212
mem,reg16+EA76324(W88=24+EA)
reg,mem9+EA77224(W88=13+EA)
reg,immed432134
mem,immed17+EA77336(W88=25+EA)
accum,immed432123
SCASScanString(Byte,WordorDoubleword)
Usage:SCASstring
SCASB
SCASW
SCASD(386+)
Modifiesflags:AFCFOFPFSFZF
ComparesvalueatES:DI(evenifoperandisspecified)fromthe
accumulatorandsetstheflagssimilartoasubtraction.DIis
incremented/decrementedbasedontheinstructionformat(or
operandsize)andthestateoftheDirectionFlag.UsewithREP
prefixes.
ClocksSize
Operands808x286386486Bytes
string157761(W88=19)
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 30/40
01/03/2017 Intel8086CPUFamilyArchitecture
SETAE/SETNBSetifAboveorEqual/SetifNotBelow(386+)
Usage:SETAEdest
SETNBdest
(unsigned,386+)
Modifiesflags:none
Setsthebyteintheoperandto1iftheCarryFlagisclear
otherwisesetstheoperandto0.
ClocksSize
Operands808x286386486Bytes
reg8433
mem8543
SETB/SETNAESetifBelow/SetifNotAboveorEqual(386+)
Usage:SETBdest
SETNAEdest
(unsigned,386+)
Modifiesflags:none
Setsthebyteintheoperandto1iftheCarryFlagisset
otherwisesetstheoperandto0.
ClocksSize
Operands808x286386486Bytes
reg8433
mem8543
SETBE/SETNASetifBeloworEqual/SetifNotAbove(386+)
Usage:SETBEdest
SETNAdest
(unsigned,386+)
Modifiesflags:none
Setsthebyteintheoperandto1iftheCarryFlagortheZero
Flagisset,otherwisesetstheoperandto0.
ClocksSize
Operands808x286386486Bytes
reg8433
mem8543
SETE/SETZSetifEqual/SetifZero(386+)
Usage:SETEdest
SETZdest
Modifiesflags:none
Setsthebyteintheoperandto1iftheZeroFlagisset,
otherwisesetstheoperandto0.
ClocksSize
Operands808x286386486Bytes
reg8433
mem8543
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 31/40
01/03/2017 Intel8086CPUFamilyArchitecture
SETNE/SETNZSetifNotEqual/SetifNotZero(386+)
Usage:SETNEdest
SETNZdest
Modifiesflags:none
Setsthebyteintheoperandto1iftheZeroFlagisclear,
otherwisesetstheoperandto0.
ClocksSize
Operands808x286386486Bytes
reg8433
mem8543
SETL/SETNGESetifLess/SetifNotGreaterorEqual(386+)
Usage:SETLdest
SETNGEdest
(signed,386+)
Modifiesflags:none
Setsthebyteintheoperandto1iftheSignFlagisnotequal
totheOverflowFlag,otherwisesetstheoperandto0.
ClocksSize
Operands808x286386486Bytes
reg8433
mem8543
SETGE/SETNLSetifGreaterorEqual/SetifNotLess(386+)
Usage:SETGEdest
SETNLdest
(signed,386+)
Modifiesflags:none
Setsthebyteintheoperandto1iftheSignFlagequalsthe
OverflowFlag,otherwisesetstheoperandto0.
ClocksSize
Operands808x286386486Bytes
reg8433
mem8543
SETLE/SETNGSetifLessorEqual/SetifNotgreaterorEqual(386+)
Usage:SETLEdest
SETNGdest
(signed,386+)
Modifiesflags:none
Setsthebyteintheoperandto1iftheZeroFlagissetorthe
SignFlagisnotequaltotheOverflowFlag,otherwisesetsthe
operandto0.
ClocksSize
Operands808x286386486Bytes
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 32/40
01/03/2017 Intel8086CPUFamilyArchitecture
reg8433
mem8543
SETG/SETNLESetifGreater/SetifNotLessorEqual(386+)
Usage:SETGdest
SETNLEdest
(signed,386+)
Modifiesflags:none
Setsthebyteintheoperandto1iftheZeroFlagisclearorthe
SignFlagequalstotheOverflowFlag,otherwisesetstheoperand
to0.
ClocksSize
Operands808x286386486Bytes
reg8433
mem8543
SETSSetifSigned(386+)
Usage:SETSdest
Modifiesflags:none
Setsthebyteintheoperandto1iftheSignFlagisset,otherwise
setstheoperandto0.
ClocksSize
Operands808x286386486Bytes
reg8433
mem8543
SETNSSetifNotSigned(386+)
Usage:SETNSdest
Modifiesflags:none
Setsthebyteintheoperandto1iftheSignFlagisclear,
otherwisesetstheoperandto0.
ClocksSize
Operands808x286386486Bytes
reg8433
mem8543
SETCSetifCarry(386+)
Usage:SETCdest
Modifiesflags:none
Setsthebyteintheoperandto1iftheCarryFlagisset,
otherwisesetstheoperandto0.
ClocksSize
Operands808x286386486Bytes
reg8433
mem8543
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 33/40
01/03/2017 Intel8086CPUFamilyArchitecture
SETNCSetifNotCarry(386+)
Usage:SETNCdest
Modifiesflags:none
Setsthebyteintheoperandto1iftheCarryFlagisclear,
otherwisesetstheoperandto0.
ClocksSize
Operands808x286386486Bytes
reg8433
mem8543
SETOSetifOverflow(386+)
Usage:SETOdest
Modifiesflags:none
Setsthebyteintheoperandto1iftheOverflowFlagisset,
otherwisesetstheoperandto0.
ClocksSize
Operands808x286386486Bytes
reg8433
mem8543
SETNOSetifNotOverflow(386+)
Usage:SETNOdest
Modifiesflags:none
Setsthebyteintheoperandto1iftheOverflowFlagisclear,
otherwisesetstheoperandto0.
ClocksSize
Operands808x286386486Bytes
reg8433
mem8543
SETP/SETPESetifParity/SetifParityEven(386+)
Usage:SETPdest
SETPEdest
Modifiesflags:none
Setsthebyteintheoperandto1iftheParityFlagisset,
otherwisesetstheoperandto0.
ClocksSize
Operands808x286386486Bytes
reg8433
mem8543
SETNP/SETPOSetifNoParity/SetifParityOdd(386+)
Usage:SETNPdest
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 34/40
01/03/2017 Intel8086CPUFamilyArchitecture
SETPOdest
Modifiesflags:none
Setsthebyteintheoperandto1iftheParityFlagisclear,
otherwisesetstheoperandto0.
ClocksSize
Operands808x286386486Bytes
reg8433
mem8543
SGDTStoreGlobalDescriptorTable(286+privileged)
Usage:SGDTdest
Modifiesflags:none
StorestheGlobalDescriptorTable(GDT)Registerintothe
specifiedoperand.
ClocksSize
Operands808x286386486Bytes
mem64119105
SIDTStoreInterruptDescriptorTable(286+privileged)
Usage:SIDTdest
Modifiesflags:none
StorestheInterruptDescriptorTable(IDT)Registerintothe
specifiedoperand.
ClocksSize
Operands808x286386486Bytes
mem64129105
SHLShiftLogicalLeft
See:SAL
SHRShiftLogicalRight
Usage:SHRdest,count
Modifiesflags:CFOFPFSFZF(AFundefined)
0>7>0>C
Shiftsthedestinationrightby"count"bitswithzeroesshifted
inontheleft.TheCarryFlagcontainsthelastbitshiftedout.
ClocksSize
Operands808x286386486Bytes
reg,12232
mem,115+EA7724(W88=23+EA)
reg,CL8+4n5+n32
mem,CL20+EA+4n8+n724(W88=28+EA+4n)
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 35/40
01/03/2017 Intel8086CPUFamilyArchitecture
reg,immed85+n33
mem,immed88+n735
SHLD/SHRDDoublePrecisionShift(386+)
Usage:SHLDdest,src,count
SHRDdest,src,count
Modifiesflags:CFPFSFZF(OF,AFundefined)
SHLDshifts"dest"totheleft"count"timesandthebitpositions
openedarefilledwiththemostsignificantbitsof"src".SHRD
shifts"dest"totheright"count"timesandthebitpositions
openedarefilledwiththeleastsignificantbitsofthesecond
operand.Onlythe5lowerbitsof"count"areused.
ClocksSize
Operands808x286386486Bytes
reg16,reg16,immed8324
reg32,reg32,immed8324
mem16,reg16,immed8736
mem32,reg32,immed8736
reg16,reg16,CL333
reg32,reg32,CL333
mem16,reg16,CL745
mem32,reg32,CL745
SLDTStoreLocalDescriptorTable(286+privileged)
Usage:SLDTdest
Modifiesflags:none
StorestheLocalDescriptorTable(LDT)Registerintothe
specifiedoperand.
ClocksSize
Operands808x286386486Bytes
reg162223
mem162235
SMSWStoreMachineStatusWord(286+privileged)
Usage:SMSWdest
Modifiesflags:none
StoreMachineStatusWord(MSW)into"dest".
ClocksSize
Operands808x286386486Bytes
reg1621023
mem163335
STCSetCarry
Usage:STC
Modifiesflags:CF
SetstheCarryFlagto1.
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 36/40
01/03/2017 Intel8086CPUFamilyArchitecture
ClocksSize
Operands808x286386486Bytes
none22221
STDSetDirectionFlag
Usage:STD
Modifiesflags:DF
SetstheDirectionFlagto1causingstringinstructionsto
autodecrementSIandDIinsteadofautoincrement.
ClocksSize
Operands808x286386486Bytes
none22221
STISetInterruptFlag(EnableInterrupts)
Usage:STI
Modifiesflags:IF
SetstheInterruptFlagto1,whichenablesrecognitionofall
hardwareinterrupts.Ifaninterruptisgeneratedbyahardware
device,anEndofInterrupt(EOI)mustalsobeissuedtoenable
otherhardwareinterruptsofthesameorlowerpriority.
ClocksSize
Operands808x286386486Bytes
none22251
STOSStoreString(Byte,WordorDoubleword)
Usage:STOSdest
STOSB
STOSW
STOSD
Modifiesflags:None
StoresvalueinaccumulatortolocationatES:(E)DI(evenifoperand
isgiven).(E)DIisincremented/decrementedbasedonthesizeof
theoperand(orinstructionformat)andthestateoftheDirection
Flag.UsewithREPprefixes.
ClocksSize
Operands808x286386486Bytes
dest113451(W88=15)
STRStoreTaskRegister(286+privileged)
Usage:STRdest
Modifiesflags:None
StoresthecurrentTaskRegistertothespecifiedoperand.
ClocksSize
Operands808x286386486Bytes
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 37/40
01/03/2017 Intel8086CPUFamilyArchitecture
reg162223
mem163235
SUBSubtract
Usage:SUBdest,src
Modifiesflags:AFCFOFPFSFZF
Thesourceissubtractedfromthedestinationandtheresultis
storedinthedestination.
ClocksSize
Operands808x286386486Bytes
reg,reg32212
mem,reg16+EA76324(W88=24+EA)
reg,mem9+EA77224(W88=13+EA)
reg,immed432134
mem,immed17+EA77336(W88=25+EA)
accum,immed432123
TESTTestForBitPattern
Usage:TESTdest,src
Modifiesflags:CFOFPFSFZF(AFundefined)
PerformsalogicalANDofthetwooperandsupdatingtheflags
registerwithoutsavingtheresult.
ClocksSize
Operands808x286386486Bytes
reg,reg32112
reg,mem9+EA65124(W88=13+EA)
mem,reg9+EA65224(W88=13+EA)
reg,immed532134
mem,immed11+EA65236
accum,immed432123
VERRVerifyRead(286+protected)
Usage:VERRsrc
Modifiesflags:ZF
Verifiesthespecifiedsegmentselectorisvalidandisreadable
atthecurrentprivilegelevel.Ifthesegmentisreadable,
theZeroFlagisset,otherwiseitiscleared.
ClocksSize
Operands808x286386486Bytes
reg161410113
mem161611115
VERWVerifyWrite(286+protected)
Usage:VERWsrc
Modifiesflags:ZF
Verifiesthespecifiedsegmentselectorisvalidandisratable
atthecurrentprivilegelevel.Ifthesegmentiswritable,
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 38/40
01/03/2017 Intel8086CPUFamilyArchitecture
theZeroFlagisset,otherwiseitiscleared.
ClocksSize
Operands808x286386486Bytes
reg161415113
mem161616115
WAIT/FWAITEventWait
Usage:WAIT
FWAIT
Modifiesflags:None
CPUenterswaitstateuntilthecoprocessorsignalsithasfinished
itsoperation.ThisinstructionisusedtopreventtheCPUfrom
accessingmemorythatmaybetemporarilyinusebythecoprocessor.
WAITandFWAITareidentical.
ClocksSize
Operands808x286386486Bytes
none436+131
WBINVDWriteBackandInvalidateCache(486+)
Usage:WBINVD
Modifiesflags:None
Flushesinternalcache,thensignalstheexternalcachetowrite
backcurrentdatafollowedbyasignaltoflushtheexternalcache.
ClocksSize
Operands808x286386486Bytes
none52
XCHGExchange
Usage:XCHGdest,src
Modifiesflags:None
Exchangescontentsofsourceanddestination.
ClocksSize
Operands808x286386486Bytes
reg,reg43332
mem,reg17+EA55524(W88=25+EA)
reg,mem17+EA55324(W88=25+EA)
accum,reg33331
reg,accum33331
XLAT/XLATBTranslate
Usage:XLATtranslationtable
XLATB(masm5.x)
Modifiesflags:None
ReplacesthebyteinALwithbytefromausertableaddressedby
BX.TheoriginalvalueofAListheindexintothetranslatetable.
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 39/40
01/03/2017 Intel8086CPUFamilyArchitecture
ThebestwaytodiscripethisisMOVAL,[BX+AL]
ClocksSize
Operands808x286386486Bytes
tableoffset115541
XORExclusiveOR
Usage:XORdest,src
Modifiesflags:CFOFPFSFZF(AFundefined)
PerformsabitwiseexclusiveORoftheoperandsandreturns
theresultinthedestination.
ClocksSize
Operands808x286386486Bytes
reg,reg32212
mem,reg16+EA76324(W88=24+EA)
reg,mem9+EA77224(W88=13+EA)
reg,immed432134
mem,immed17+EA77336(W88=25+EA)
accum,immed432123
.:n0i.net:.
file:///D:/TECHNICAL%20EBOOKS/MICROPROCESSOR/8086/Intel%208086%20CPU%20Family%20Architecture.htm 40/40