SlideShare a Scribd company logo
1 of 12
Program Flow Control
Instructions
Unconditional Jumps
• Unconditional Jumps
• The basic instruction that transfers control to another
point in the program is JMP. The basic syntax of JMP
instruction
General Form (Syntax):
• JMP label
• JMP is able to transfer control both forward and
backward.
• Here the CS and IP are unconditionally modified with
new CS and IP values.
• No flags are checked or affected by this instruction
Unconditional Jumps
• Intra-segment Jump or NEAR jump :
• If the target of JMP is in the same code segment,
it requires only the IP to be changed to transfer
control to the target location. This is called intra-
segment jump or NEAR jump
• Inter-segment or FAR jump :
• If the target for the instruction JMP is in different
code segment from that containing the JMP, then
IP and CS will be changed to transfer control to
the target location. Such a jump is called FAR or
Inter- Segment jump.
Unconditional Jumps
• Unlike JMP instruction that does an
unconditional jump, there are instructions
that do a conditional jumps (jump only when
some conditions are in act).
• The different types of conditional instruction
are as given in the next slide…
Jump instructions based on Flags
Instruction Description Condition Similar
Instructions
JC Jump if carry Carry = 1 JB, JNAE
JNC Jump if no carry Carry = 0 JNB, JAE
JZ Jump if zero Zero = 1 JE
JNZ Jump if not zero Zero = 0 JNE
JS Jump if sign Sign = 1 -
JNS Jump if no sign Sign = 0 -
JO Jump if overflow Ovrflw=1 -
JNO Jump if no Ovrflw Ovrflw=0 -
JP Jump if parity Parity = 1 JPE
JPE Jump if parity even Parity = 1 JP
JNP Jump if no parity Parity = 0 JPO
JPO Jump if parity odd Parity = 0 JNP
Jump Instructions based on Unsigned
numbers
Instruction Description Condition
Similar
Instructions
JA Jump if above (>) Carry=0, Zero=0 JNBE
JNBE Jump if not below or equal (not <=) Carry=0, Zero=0 JA
JAE Jump if above or equal (>=) Carry = 0 JNC, JNB
JNB Jump if not below (not <) Carry = 0 JNC, JAE
JB Jump if below (<) Carry = 1 JC, JNAE
JNAE Jump if not above or equal (not >=) Carry = 1 JC, JB
JBE Jump if below or equal (<=)
Carry = 1 or Zero
= 1
JNA
JNA Jump if not above (not >)
Carry = 1 or Zero
= 1
JBE
JE Jump if equal (=) Zero = 1 JZ
JNE Jump if not equal () Zero = 0 JNZ
Jump Instructions for signed numbers
Instruction Description Condition
Similar
Instructions
JG Jump if greater (>)
Sign = Ovrflw
or Zero=0
JNLE
JNLE
Jump if not less than or equal (not
<=)
Sign = Ovrflw
or Zero=0
JG
JGE Jump if greater than or equal (>=) Sign = Ovrflw JNL
JNL Jump if not less than (not <) Sign = Ovrflw JGE
JL Jump if less than (<) Sign Ovrflw JNGE
JNGE Jump if not greater or equal (not >=) Sign Ovrflw JL
JLE Jump if less than or equal (<=)
Sign Ovrflw or
Zero = 1
JNG
JNG Jump if not greater than (not >)
Sign Ovrflw or
Zero = 1
JLE
JE Jump if equal (=) Zero = 1 JZ
JNE Jump if not equal () Zero = 0 JNZ
Jump Instructions for signed numbers
Instruction Description Condition
Similar
Instructions
JG Jump if greater (>)
Sign = Ovrflw
or Zero=0
JNLE
JNLE
Jump if not less than or equal (not
<=)
Sign = Ovrflw
or Zero=0
JG
JGE Jump if greater than or equal (>=) Sign = Ovrflw JNL
JNL Jump if not less than (not <) Sign = Ovrflw JGE
JL Jump if less than (<) Sign Ovrflw JNGE
JNGE Jump if not greater or equal (not >=) Sign Ovrflw JL
JLE Jump if less than or equal (<=)
Sign Ovrflw or
Zero = 1
JNG
JNG Jump if not greater than (not >)
Sign Ovrflw or
Zero = 1
JLE
JE Jump if equal (=) Zero = 1 JZ
JNE Jump if not equal () Zero = 0 JNZ
Machine Control Instructions
• HLT : (Halt)
• This instruction causes the processor to enter to halt state.
• CPU stops fetching and executing instructions
• CPU is brought out of the halt state when reset signal is
given to it, or NMI is given or INTR pin goes high.
• NOP: (No Operation)
• This instruction is used to add wait states of 3 clock cycles.
• During these three clock cycles, CPU does not perform
anything.
• This instruction is useful in delay programs to add delay
loops
Machine Control Instructions
• WAIT
• This instruction causes the processor to enter into an idle state or a
wait state.
• Processor continues to remain in the wait state till a valid INTR or
NMI or a TEST pin goes high.
• It is used to synchronise with other external hardware such as Math
co-processor 8087.
• LOCK
• This instruction causes the processor to take control of the shared
resources.
• This is used as an instruction prefix to some critical instructions
which has to be executed.
• While LOCKED, it prevents the resources to be shared by other
processors.
• Example : LOCK IN AL,80H
Flag manipulation instructions
These instructions are used to change the status of flags in the
flag register such as Carry, Direction and Interrupt.
• CLC
• This instruction clears the Carry Flag
• CF  0
• CMC
• This instruction complements the Carry Flag
• CF  Complement of CF
• STC
• This instruction sets the Carry Flag
• CF  1
Flag manipulation instructions
• CLD
• This instruction clears the Direction Flag
• DF  0
• STD
• This instruction sets the Direction Flag
• DF  1
• CLI
• This instruction clears the Interrupt Flag
• IF  0
• STI
• This instruction sets the Interrupt Flag
• IF  1

More Related Content

Similar to Chapter3 program flow control instructions

Program control instructions
Program control instructionsProgram control instructions
Program control instructionsDr. Girish GS
 
Instruction Set Of 8086 DIU CSE
Instruction Set Of 8086 DIU CSEInstruction Set Of 8086 DIU CSE
Instruction Set Of 8086 DIU CSEsalmancreation
 
Flow control instructions
Flow control instructionsFlow control instructions
Flow control instructionsProdip Ghosh
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...Bilal Amjad
 
Decision Making Statement in C ppt
Decision Making Statement in C pptDecision Making Statement in C ppt
Decision Making Statement in C pptMANJUTRIPATHI7
 
Intel codetable
Intel codetableIntel codetable
Intel codetableJ R7
 

Similar to Chapter3 program flow control instructions (11)

Program control instructions
Program control instructionsProgram control instructions
Program control instructions
 
Branching
BranchingBranching
Branching
 
Flag control
Flag controlFlag control
Flag control
 
microcontroller.ppt
microcontroller.pptmicrocontroller.ppt
microcontroller.ppt
 
Instruction Set Of 8086 DIU CSE
Instruction Set Of 8086 DIU CSEInstruction Set Of 8086 DIU CSE
Instruction Set Of 8086 DIU CSE
 
Flow control instructions
Flow control instructionsFlow control instructions
Flow control instructions
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
 
Al2ed chapter7
Al2ed chapter7Al2ed chapter7
Al2ed chapter7
 
Decision Making Statement in C ppt
Decision Making Statement in C pptDecision Making Statement in C ppt
Decision Making Statement in C ppt
 
Intel codetable
Intel codetableIntel codetable
Intel codetable
 
[ASM]Lab5
[ASM]Lab5[ASM]Lab5
[ASM]Lab5
 

More from HarshitParkar6677 (20)

Wi fi hacking
Wi fi hackingWi fi hacking
Wi fi hacking
 
D dos attack
D dos attackD dos attack
D dos attack
 
Notes chapter 6
Notes chapter  6Notes chapter  6
Notes chapter 6
 
Interface notes
Interface notesInterface notes
Interface notes
 
Chapter6 2
Chapter6 2Chapter6 2
Chapter6 2
 
Chapter6
Chapter6Chapter6
Chapter6
 
8086 cpu 1
8086 cpu 18086 cpu 1
8086 cpu 1
 
Chapter 6 notes
Chapter 6 notesChapter 6 notes
Chapter 6 notes
 
Chapter 5 notes
Chapter 5 notesChapter 5 notes
Chapter 5 notes
 
Chap6 procedures &amp; macros
Chap6 procedures &amp; macrosChap6 procedures &amp; macros
Chap6 procedures &amp; macros
 
Chapter 5 notes new
Chapter 5 notes newChapter 5 notes new
Chapter 5 notes new
 
Notes arithmetic instructions
Notes arithmetic instructionsNotes arithmetic instructions
Notes arithmetic instructions
 
Notes all instructions
Notes all instructionsNotes all instructions
Notes all instructions
 
Notes aaa aa
Notes aaa aaNotes aaa aa
Notes aaa aa
 
Notes 8086 instruction format
Notes 8086 instruction formatNotes 8086 instruction format
Notes 8086 instruction format
 
Copy of 8086inst logical
Copy of 8086inst logicalCopy of 8086inst logical
Copy of 8086inst logical
 
Copy of 8086inst logical
Copy of 8086inst logicalCopy of 8086inst logical
Copy of 8086inst logical
 
Chapter3 8086inst stringsl
Chapter3 8086inst stringslChapter3 8086inst stringsl
Chapter3 8086inst stringsl
 
Chapter3 8086inst logical 2
Chapter3 8086inst logical 2Chapter3 8086inst logical 2
Chapter3 8086inst logical 2
 
Chapter 3 8086 ins2 math
Chapter 3 8086 ins2 mathChapter 3 8086 ins2 math
Chapter 3 8086 ins2 math
 

Recently uploaded

Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 

Recently uploaded (20)

Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 

Chapter3 program flow control instructions

  • 2. Unconditional Jumps • Unconditional Jumps • The basic instruction that transfers control to another point in the program is JMP. The basic syntax of JMP instruction General Form (Syntax): • JMP label • JMP is able to transfer control both forward and backward. • Here the CS and IP are unconditionally modified with new CS and IP values. • No flags are checked or affected by this instruction
  • 3. Unconditional Jumps • Intra-segment Jump or NEAR jump : • If the target of JMP is in the same code segment, it requires only the IP to be changed to transfer control to the target location. This is called intra- segment jump or NEAR jump • Inter-segment or FAR jump : • If the target for the instruction JMP is in different code segment from that containing the JMP, then IP and CS will be changed to transfer control to the target location. Such a jump is called FAR or Inter- Segment jump.
  • 4. Unconditional Jumps • Unlike JMP instruction that does an unconditional jump, there are instructions that do a conditional jumps (jump only when some conditions are in act). • The different types of conditional instruction are as given in the next slide…
  • 5. Jump instructions based on Flags Instruction Description Condition Similar Instructions JC Jump if carry Carry = 1 JB, JNAE JNC Jump if no carry Carry = 0 JNB, JAE JZ Jump if zero Zero = 1 JE JNZ Jump if not zero Zero = 0 JNE JS Jump if sign Sign = 1 - JNS Jump if no sign Sign = 0 - JO Jump if overflow Ovrflw=1 - JNO Jump if no Ovrflw Ovrflw=0 - JP Jump if parity Parity = 1 JPE JPE Jump if parity even Parity = 1 JP JNP Jump if no parity Parity = 0 JPO JPO Jump if parity odd Parity = 0 JNP
  • 6. Jump Instructions based on Unsigned numbers Instruction Description Condition Similar Instructions JA Jump if above (>) Carry=0, Zero=0 JNBE JNBE Jump if not below or equal (not <=) Carry=0, Zero=0 JA JAE Jump if above or equal (>=) Carry = 0 JNC, JNB JNB Jump if not below (not <) Carry = 0 JNC, JAE JB Jump if below (<) Carry = 1 JC, JNAE JNAE Jump if not above or equal (not >=) Carry = 1 JC, JB JBE Jump if below or equal (<=) Carry = 1 or Zero = 1 JNA JNA Jump if not above (not >) Carry = 1 or Zero = 1 JBE JE Jump if equal (=) Zero = 1 JZ JNE Jump if not equal () Zero = 0 JNZ
  • 7. Jump Instructions for signed numbers Instruction Description Condition Similar Instructions JG Jump if greater (>) Sign = Ovrflw or Zero=0 JNLE JNLE Jump if not less than or equal (not <=) Sign = Ovrflw or Zero=0 JG JGE Jump if greater than or equal (>=) Sign = Ovrflw JNL JNL Jump if not less than (not <) Sign = Ovrflw JGE JL Jump if less than (<) Sign Ovrflw JNGE JNGE Jump if not greater or equal (not >=) Sign Ovrflw JL JLE Jump if less than or equal (<=) Sign Ovrflw or Zero = 1 JNG JNG Jump if not greater than (not >) Sign Ovrflw or Zero = 1 JLE JE Jump if equal (=) Zero = 1 JZ JNE Jump if not equal () Zero = 0 JNZ
  • 8. Jump Instructions for signed numbers Instruction Description Condition Similar Instructions JG Jump if greater (>) Sign = Ovrflw or Zero=0 JNLE JNLE Jump if not less than or equal (not <=) Sign = Ovrflw or Zero=0 JG JGE Jump if greater than or equal (>=) Sign = Ovrflw JNL JNL Jump if not less than (not <) Sign = Ovrflw JGE JL Jump if less than (<) Sign Ovrflw JNGE JNGE Jump if not greater or equal (not >=) Sign Ovrflw JL JLE Jump if less than or equal (<=) Sign Ovrflw or Zero = 1 JNG JNG Jump if not greater than (not >) Sign Ovrflw or Zero = 1 JLE JE Jump if equal (=) Zero = 1 JZ JNE Jump if not equal () Zero = 0 JNZ
  • 9. Machine Control Instructions • HLT : (Halt) • This instruction causes the processor to enter to halt state. • CPU stops fetching and executing instructions • CPU is brought out of the halt state when reset signal is given to it, or NMI is given or INTR pin goes high. • NOP: (No Operation) • This instruction is used to add wait states of 3 clock cycles. • During these three clock cycles, CPU does not perform anything. • This instruction is useful in delay programs to add delay loops
  • 10. Machine Control Instructions • WAIT • This instruction causes the processor to enter into an idle state or a wait state. • Processor continues to remain in the wait state till a valid INTR or NMI or a TEST pin goes high. • It is used to synchronise with other external hardware such as Math co-processor 8087. • LOCK • This instruction causes the processor to take control of the shared resources. • This is used as an instruction prefix to some critical instructions which has to be executed. • While LOCKED, it prevents the resources to be shared by other processors. • Example : LOCK IN AL,80H
  • 11. Flag manipulation instructions These instructions are used to change the status of flags in the flag register such as Carry, Direction and Interrupt. • CLC • This instruction clears the Carry Flag • CF  0 • CMC • This instruction complements the Carry Flag • CF  Complement of CF • STC • This instruction sets the Carry Flag • CF  1
  • 12. Flag manipulation instructions • CLD • This instruction clears the Direction Flag • DF  0 • STD • This instruction sets the Direction Flag • DF  1 • CLI • This instruction clears the Interrupt Flag • IF  0 • STI • This instruction sets the Interrupt Flag • IF  1