SlideShare a Scribd company logo
JUMP&LOOP
INSTRUCTION
JUMP INSTRUCTION IN 8086
MICROPROCESSOR
JUMP INSTRUCTIONS ARE USED FOR CHANGING THE
FLOW OF EXECUTION OF INSTRUCTIONS IN THE
PROCESSOR.
IF WE WANT JUMP TO ANY INSTRUCTION IN BETWEEN
THE CODE, THEN THIS CAN BE ACHIEVED BY THESE
INSTRUCTIONS.
THERE ARE TWO TYPES OF JUMP INSTRUCTIONS:
1.UNCONDITIONAL JUMP INSTRUCTIONS
2.CONDITIONAL JUMP INSTRUCTIONS
Unconditional Jump
Instructions
 Unconditional jump instruction does not check for any
flag instruction
JC : Stands for 'Jump if Carry'
It checks whether the carry flag is set or not. If yes, then jump takes place, that is: If CF = 1,
then jump
JE / JZ : Stands for 'Jump if Equal' or 'Jump if Zero'
It checks whether the zero flag is set or not. If yes, then jump takes place, that is: If ZF = 1,
then jump.
JNE / JNZ : Stands for 'Jump if Not Equal' or 'Jump if Not Zero'
It checks whether the zero flag is reset or not. If yes, then jump takes place, that is: If ZF = 0,
then jump.
Conditional Jump Instruction
 Conditional jump instruction must be check for any
flag instruction
MOV AL,255
ADD AL,1
JC label 1
PRINT ‘no carry’
JMP exit
label 1:
PRINT ‘has carry’
exit:
RET
Example:
JP / JPE : Stands for 'Jump if Parity' or 'Jump if Even Parity'
It checks whether the Parity flag is set or not. If yes, then jump takes place, that is: If
PF = 1, then jump.
JNP / JPO : Stands for 'Jump if Not Parity' or 'Jump if Odd Parity'
It checks whether the Parity flag is reset or not. If yes, then jump takes place, that
is: If PF = 0, then jump.
 The Loop instructions use the CX register to indicate
the loop count.
 The Loop instruction decrements CX without changing
any flags
 If CX is not zero after the decrement, control is
transferred to the destination label
Loop Instruction

More Related Content

What's hot

Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 80869840596838
 
MIPS Addressing Modes
MIPS Addressing ModesMIPS Addressing Modes
MIPS Addressing Modes
babuece
 
Multiplication & division instructions microprocessor 8086
Multiplication & division instructions microprocessor 8086Multiplication & division instructions microprocessor 8086
Multiplication & division instructions microprocessor 8086
University of Gujrat, Pakistan
 
3 jump, loop and call instructions
3 jump, loop and call instructions3 jump, loop and call instructions
3 jump, loop and call instructions
Channabasappa Kudarihal
 
Stack and subroutine
Stack and subroutineStack and subroutine
Stack and subroutine
Suchismita Paul
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
Dr. AISHWARYA N
 
I/O port programming in 8051
I/O port programming in 8051I/O port programming in 8051
I/O port programming in 8051
ssuser3a47cb
 
Splay Tree
Splay TreeSplay Tree
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
Bilal Amjad
 
Flag register 8086 assignment
Flag register 8086 assignmentFlag register 8086 assignment
Flag register 8086 assignment
Zia3130
 
Quick tutorial on IEEE 754 FLOATING POINT representation
Quick tutorial on IEEE 754 FLOATING POINT representationQuick tutorial on IEEE 754 FLOATING POINT representation
Quick tutorial on IEEE 754 FLOATING POINT representation
Ritu Ranjan Shrivastwa
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipelining
Mazin Alwaaly
 
Modules and ports in Verilog HDL
Modules and ports in Verilog HDLModules and ports in Verilog HDL
Modules and ports in Verilog HDL
anand hd
 
8051 data types and directives
8051 data types and directives8051 data types and directives
8051 data types and directives
SARITHA REDDY
 
Logical and shift micro operations
Logical and shift micro operationsLogical and shift micro operations
Logical and shift micro operations
Sanjeev Patel
 
Unit 3 basic processing unit
Unit 3   basic processing unitUnit 3   basic processing unit
Unit 3 basic processing unitchidabdu
 
Hamming code system
Hamming code systemHamming code system
Hamming code system
DILSHAD AHMAD
 
8086
80868086
Program control instructions
Program control instructionsProgram control instructions
Program control instructions
Dr. Girish GS
 

What's hot (20)

Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
MIPS Addressing Modes
MIPS Addressing ModesMIPS Addressing Modes
MIPS Addressing Modes
 
Multiplication & division instructions microprocessor 8086
Multiplication & division instructions microprocessor 8086Multiplication & division instructions microprocessor 8086
Multiplication & division instructions microprocessor 8086
 
3 jump, loop and call instructions
3 jump, loop and call instructions3 jump, loop and call instructions
3 jump, loop and call instructions
 
Stack and subroutine
Stack and subroutineStack and subroutine
Stack and subroutine
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
I/O port programming in 8051
I/O port programming in 8051I/O port programming in 8051
I/O port programming in 8051
 
Splay Tree
Splay TreeSplay Tree
Splay Tree
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
 
Flag register 8086 assignment
Flag register 8086 assignmentFlag register 8086 assignment
Flag register 8086 assignment
 
Quick tutorial on IEEE 754 FLOATING POINT representation
Quick tutorial on IEEE 754 FLOATING POINT representationQuick tutorial on IEEE 754 FLOATING POINT representation
Quick tutorial on IEEE 754 FLOATING POINT representation
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipelining
 
Modules and ports in Verilog HDL
Modules and ports in Verilog HDLModules and ports in Verilog HDL
Modules and ports in Verilog HDL
 
8051 data types and directives
8051 data types and directives8051 data types and directives
8051 data types and directives
 
Logical and shift micro operations
Logical and shift micro operationsLogical and shift micro operations
Logical and shift micro operations
 
Unit 3 basic processing unit
Unit 3   basic processing unitUnit 3   basic processing unit
Unit 3 basic processing unit
 
Hamming code system
Hamming code systemHamming code system
Hamming code system
 
Mips
MipsMips
Mips
 
8086
80868086
8086
 
Program control instructions
Program control instructionsProgram control instructions
Program control instructions
 

Recently uploaded

Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 

Recently uploaded (20)

Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 

Jump&Loop instruction

  • 2. JUMP INSTRUCTION IN 8086 MICROPROCESSOR JUMP INSTRUCTIONS ARE USED FOR CHANGING THE FLOW OF EXECUTION OF INSTRUCTIONS IN THE PROCESSOR. IF WE WANT JUMP TO ANY INSTRUCTION IN BETWEEN THE CODE, THEN THIS CAN BE ACHIEVED BY THESE INSTRUCTIONS. THERE ARE TWO TYPES OF JUMP INSTRUCTIONS: 1.UNCONDITIONAL JUMP INSTRUCTIONS 2.CONDITIONAL JUMP INSTRUCTIONS
  • 3. Unconditional Jump Instructions  Unconditional jump instruction does not check for any flag instruction
  • 4. JC : Stands for 'Jump if Carry' It checks whether the carry flag is set or not. If yes, then jump takes place, that is: If CF = 1, then jump JE / JZ : Stands for 'Jump if Equal' or 'Jump if Zero' It checks whether the zero flag is set or not. If yes, then jump takes place, that is: If ZF = 1, then jump. JNE / JNZ : Stands for 'Jump if Not Equal' or 'Jump if Not Zero' It checks whether the zero flag is reset or not. If yes, then jump takes place, that is: If ZF = 0, then jump. Conditional Jump Instruction  Conditional jump instruction must be check for any flag instruction
  • 5. MOV AL,255 ADD AL,1 JC label 1 PRINT ‘no carry’ JMP exit label 1: PRINT ‘has carry’ exit: RET Example: JP / JPE : Stands for 'Jump if Parity' or 'Jump if Even Parity' It checks whether the Parity flag is set or not. If yes, then jump takes place, that is: If PF = 1, then jump. JNP / JPO : Stands for 'Jump if Not Parity' or 'Jump if Odd Parity' It checks whether the Parity flag is reset or not. If yes, then jump takes place, that is: If PF = 0, then jump.
  • 6.  The Loop instructions use the CX register to indicate the loop count.  The Loop instruction decrements CX without changing any flags  If CX is not zero after the decrement, control is transferred to the destination label Loop Instruction