SlideShare a Scribd company logo
1 of 19
By: 
Himanshu Alwani 
Venkatesh Sharma 
14/10/14 alwanihimanshu@gmail.com 1
Classification of Instruction Set 
Data Transfer Instructions 
 Logical & Shift & Rotate Instructions 
 Arithmetic Instructions 
 String Instructions 
 Branch & Loop Instructions 
Miscellaneous Instructions 
2
Data Transfer Instructions 
 These instructions are used to transfer data 
from source to destination. 
The operand can be a constant, memory 
location, register or I/O port address. 
1. MOV-Copy byte or word from source to 
destination 
2. PUSH-Copy specified word to top of stack 
3
Data Transfer Inst.(continue) 
3. POP-Copy word from top of stack to specified 
location 
4. XCHG-Exchange bytes or exchange words 
5. IN-Copy a byte or word from specified port to acc. 
6. OUT-Copy a byte or word from acc.to specified port 
7. XLAT-Translate a byte in AL using table in memory 
8. LEA-Load Effective address of operand into specified 
register 
9. LAHF-Load AH with the lower byte of the flag 
register 
4
Data Transfer Inst.(continue) 
10. LDS/LES-Load pointer to DS/ES.i.e.loads DS/ES 
register and other specified register from memory 
5
Logical Instructions 
1. AND-AND each bit in a byte or word with the 
corresponding bit in another byte or a word 
2. OR-OR each bit in a byte or word with the 
corresponding bit in another byte or a word 
3. NOT-Invert each bit of a byte or word 
4. XOR-Exclusive-OR each bit in a byte or word with 
the corresponding bit in another byte or a word 
5. TEST-AND operands to update flags,but don’t 
change operands 
6
Shift & Rotate Instructions 
1. SHL/SAL-Shifts bits or byte or word left, put zero(‘s) 
in LSB(‘s) 
2. SHR-Shifts bits or byte or word right, put zero(‘s) in 
MSB(‘s) 
3. SAR-Shifts bits or byte or word right, copy old MSB 
into new MSB 
4. ROR-Rotate bits of byte or word right, LSB to MSB 
and to CF 
5. ROL-Rotate bits of byte or word left, MSB to MSB 
and to CF 
7
Shift & Rotate Instructions 
6. RCR-Rotate bits of byte or word right, LSB to CF and 
CF to MSB. 
7. RCL-Rotate bits of byte or word left, MSB to CF and 
CF to LSB 
8
Arithmetic Instructions 
1. ADD-Add specified byte to byte or specified word to 
word 
2. ADC-Add byte + byte +CF or word+word+CF 
3. INC- Increment specified byte or specified word by 1 
4. DEC- Decrement specified byte or specified word by1 
5. SUB-Subtract byte from byte or word from word 
6. SBB- Subtract byte from byte with borrow(CF) 
7. CMP-Compare to specified byte or specified word 
8. NEG-Forms 2’s compliment 
9
Arithmetic Instructions 
9. MUL- Multiply unsigned byte by byte or unsigned 
word by word 
10. IMUL- Multiply signed byte by byte or unsigned 
word by word 
11. DIV- Divide unsigned word by byte or unsigned 
double word by word 
12. IDIV- Divide signed word by byte or signed double 
word by word 
13. AAA-ASCII adjust after addition 
10
Arithmetic & ASCII Inst. 
14. AAS- ASCII adjust after subtraction 
15. AAM-ASCII adjust after multiplication 
16. AAD-ASCII adjust before division 
17. DAA-Decimal(BCD) adjust after addition 
18. DAS-Decimal(BCD) adjust after subtraction 
19. CBW-Fill upper byte or word with copies of sign bit 
of lower byte 
20. CWD-Fill upper word of double word with sign bit of 
lower word 
11
String Instructions 
 There are very strong set of string instructions in 8086. 
 By using these string instructions, the size of the 
program is considerably reduced. 
1. REPE/REPZ-Repeat instruction on until CX=O or ZF 
not equals to 1 
2. REP-Repeat instruction on until CX=O 
3. MOVS/MOVSB/MOVSW-Move byte or word from 
one string to another 
21-Nov-2010 12
String Instructions 
4. REPNE/REPNZ-Repeat until CX=O or ZF=1 
5. CMPS/CMPSB/CMPSW-Compare two string bytes 
or two string words 
6. SCAS/SCASB/SCASW-Scan a string. Compare a 
string byte with a byte in AL or a string word with a 
word in AX 
21-Nov-2010 ohmshankar.ece@act.edu.in 13
Conditional Jump Table 
Mnemonic Meaning Jump Condition 
JA Jump if Above CF = 0 and ZF = 0 
JAE Jump if Above or Equal CF = 0 
JB Jump if Below CF = 1 
JBE Jump if Below or Equal CF = 1 or ZF = 1 
JC Jump if Carry CF = 1 
JE/JZ Jump if Equal ZF = 1 
JNC Jump if Not Carry CF = 0 
JNE Jump if Not Equal ZF = 0 
JNZ Jump if Not Zero ZF = 0 
JPE Jump if Parity Even PF = 1 
JPO Jump if Parity Odd PF = 0 
JMP Unconditional Jump - 
14
Branch & Loop Inst. 
1. CALL-Call a procedure(sub-program),save return 
address on stack 
2. RET- Return from procedure to calling program 
3. JNO-Jump if not overflow(OF=0) 
4. JO-Jump if OF=1 
5. JS-Jump if SF=1 
6. INTO-Interrupt program execution if OF=1 
7. LOOP-Loop through a sequence of instructions 
until CX=O 
15
Branch & Loop Inst. 
8. JCXZ-Jump to specified address if CX=O. 
16
Miscellaneous Instructions 
1. CLC-Clear carry flag to zero 
2. STC-Set the carry flag to ONE 
3. STD-Set DF=1 and decrement SP 
4. CMP-Compliment the state of carry flag(CF) 
5. STI-Set IE=1(Enable INTR input) 
6. CLD-Clear DF=O 
7. HLT-Halt the programs 
8. CLI-IE=O.(Disable INTR input) 
9. WAIT-wait until signal on the TEST pin is low 
17
Miscellaneous Instructions 
10. NOP-No action except fetch and decode 
11. LOCK-Prevents another processor from taking the 
bus while the adjacent instruction executes. 
18
19

More Related Content

What's hot

Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
9840596838
 
10 8086 instruction set
10 8086 instruction set10 8086 instruction set
10 8086 instruction set
Shivam Singhal
 
Ascii adjust & decimal adjust
Ascii adjust & decimal adjustAscii adjust & decimal adjust
Ascii adjust & decimal adjust
Tech_MX
 
8086 instruction set
8086 instruction set8086 instruction set
8086 instruction set
jemimajerome
 

What's hot (20)

8086 instruction set
8086  instruction set8086  instruction set
8086 instruction set
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
 
8086 instructions
8086 instructions8086 instructions
8086 instructions
 
10 8086 instruction set
10 8086 instruction set10 8086 instruction set
10 8086 instruction set
 
Assembly Language Lecture 5
Assembly Language Lecture 5Assembly Language Lecture 5
Assembly Language Lecture 5
 
Byte and string manipulation 8086
Byte and string manipulation 8086Byte and string manipulation 8086
Byte and string manipulation 8086
 
Instruction set of 8086 Microprocessor
Instruction set of 8086 Microprocessor Instruction set of 8086 Microprocessor
Instruction set of 8086 Microprocessor
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
 
1344 Alp Of 8086
1344 Alp Of 80861344 Alp Of 8086
1344 Alp Of 8086
 
Ascii adjust & decimal adjust
Ascii adjust & decimal adjustAscii adjust & decimal adjust
Ascii adjust & decimal adjust
 
8086 instruction set
8086 instruction set8086 instruction set
8086 instruction set
 
8086 instruction set
8086 instruction set8086 instruction set
8086 instruction set
 
Instruction set
Instruction setInstruction set
Instruction set
 
Instruction Set of 8086 Microprocessor
Instruction Set of 8086 MicroprocessorInstruction Set of 8086 Microprocessor
Instruction Set of 8086 Microprocessor
 
Unit 2 assembly language programming
Unit 2   assembly language programmingUnit 2   assembly language programming
Unit 2 assembly language programming
 
8086 alp
8086 alp8086 alp
8086 alp
 
instruction set of 8086
instruction set of 8086instruction set of 8086
instruction set of 8086
 
8086 Instruction set
8086 Instruction set8086 Instruction set
8086 Instruction set
 
Instruction formats-in-8086
Instruction formats-in-8086Instruction formats-in-8086
Instruction formats-in-8086
 

Similar to Instructionsetof8086 by Alwani

Chap 3_2.ppt
Chap 3_2.pptChap 3_2.ppt
Chap 3_2.ppt
inian2
 

Similar to Instructionsetof8086 by Alwani (20)

unit1.pdf
unit1.pdfunit1.pdf
unit1.pdf
 
Lecture5
Lecture5Lecture5
Lecture5
 
Lecture5(1)
Lecture5(1)Lecture5(1)
Lecture5(1)
 
String_manipulations.pdf
String_manipulations.pdfString_manipulations.pdf
String_manipulations.pdf
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Chap 3_2.ppt
Chap 3_2.pptChap 3_2.ppt
Chap 3_2.ppt
 
instruction-set-of-8086-mr-binu-joy3.ppt
instruction-set-of-8086-mr-binu-joy3.pptinstruction-set-of-8086-mr-binu-joy3.ppt
instruction-set-of-8086-mr-binu-joy3.ppt
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Instructionsetof8086 180224060745(3)
Instructionsetof8086 180224060745(3)Instructionsetof8086 180224060745(3)
Instructionsetof8086 180224060745(3)
 
Flag control
Flag controlFlag control
Flag control
 
8086-instruction sets.ppt
8086-instruction sets.ppt8086-instruction sets.ppt
8086-instruction sets.ppt
 
Microprocessor.pptx
Microprocessor.pptxMicroprocessor.pptx
Microprocessor.pptx
 
Reversing malware analysis training part4 assembly programming basics
Reversing malware analysis training part4 assembly programming basicsReversing malware analysis training part4 assembly programming basics
Reversing malware analysis training part4 assembly programming basics
 
8086inst stringsl
8086inst stringsl8086inst stringsl
8086inst stringsl
 
Chapter3 8086inst stringsl
Chapter3 8086inst stringslChapter3 8086inst stringsl
Chapter3 8086inst stringsl
 
Chap 8086 string
Chap 8086 stringChap 8086 string
Chap 8086 string
 
ppt-U2 - (Instruction Set of 8086, Simple programs).pptx
ppt-U2 - (Instruction Set of 8086, Simple programs).pptxppt-U2 - (Instruction Set of 8086, Simple programs).pptx
ppt-U2 - (Instruction Set of 8086, Simple programs).pptx
 
mm_1.pdf
mm_1.pdfmm_1.pdf
mm_1.pdf
 
Assembly language.pptx
Assembly language.pptxAssembly language.pptx
Assembly language.pptx
 
Arm Cortex material Arm Cortex material3222886.ppt
Arm Cortex material Arm Cortex material3222886.pptArm Cortex material Arm Cortex material3222886.ppt
Arm Cortex material Arm Cortex material3222886.ppt
 

Recently uploaded

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Krashi Coaching
 

Recently uploaded (20)

Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 

Instructionsetof8086 by Alwani

  • 1. By: Himanshu Alwani Venkatesh Sharma 14/10/14 alwanihimanshu@gmail.com 1
  • 2. Classification of Instruction Set Data Transfer Instructions  Logical & Shift & Rotate Instructions  Arithmetic Instructions  String Instructions  Branch & Loop Instructions Miscellaneous Instructions 2
  • 3. Data Transfer Instructions  These instructions are used to transfer data from source to destination. The operand can be a constant, memory location, register or I/O port address. 1. MOV-Copy byte or word from source to destination 2. PUSH-Copy specified word to top of stack 3
  • 4. Data Transfer Inst.(continue) 3. POP-Copy word from top of stack to specified location 4. XCHG-Exchange bytes or exchange words 5. IN-Copy a byte or word from specified port to acc. 6. OUT-Copy a byte or word from acc.to specified port 7. XLAT-Translate a byte in AL using table in memory 8. LEA-Load Effective address of operand into specified register 9. LAHF-Load AH with the lower byte of the flag register 4
  • 5. Data Transfer Inst.(continue) 10. LDS/LES-Load pointer to DS/ES.i.e.loads DS/ES register and other specified register from memory 5
  • 6. Logical Instructions 1. AND-AND each bit in a byte or word with the corresponding bit in another byte or a word 2. OR-OR each bit in a byte or word with the corresponding bit in another byte or a word 3. NOT-Invert each bit of a byte or word 4. XOR-Exclusive-OR each bit in a byte or word with the corresponding bit in another byte or a word 5. TEST-AND operands to update flags,but don’t change operands 6
  • 7. Shift & Rotate Instructions 1. SHL/SAL-Shifts bits or byte or word left, put zero(‘s) in LSB(‘s) 2. SHR-Shifts bits or byte or word right, put zero(‘s) in MSB(‘s) 3. SAR-Shifts bits or byte or word right, copy old MSB into new MSB 4. ROR-Rotate bits of byte or word right, LSB to MSB and to CF 5. ROL-Rotate bits of byte or word left, MSB to MSB and to CF 7
  • 8. Shift & Rotate Instructions 6. RCR-Rotate bits of byte or word right, LSB to CF and CF to MSB. 7. RCL-Rotate bits of byte or word left, MSB to CF and CF to LSB 8
  • 9. Arithmetic Instructions 1. ADD-Add specified byte to byte or specified word to word 2. ADC-Add byte + byte +CF or word+word+CF 3. INC- Increment specified byte or specified word by 1 4. DEC- Decrement specified byte or specified word by1 5. SUB-Subtract byte from byte or word from word 6. SBB- Subtract byte from byte with borrow(CF) 7. CMP-Compare to specified byte or specified word 8. NEG-Forms 2’s compliment 9
  • 10. Arithmetic Instructions 9. MUL- Multiply unsigned byte by byte or unsigned word by word 10. IMUL- Multiply signed byte by byte or unsigned word by word 11. DIV- Divide unsigned word by byte or unsigned double word by word 12. IDIV- Divide signed word by byte or signed double word by word 13. AAA-ASCII adjust after addition 10
  • 11. Arithmetic & ASCII Inst. 14. AAS- ASCII adjust after subtraction 15. AAM-ASCII adjust after multiplication 16. AAD-ASCII adjust before division 17. DAA-Decimal(BCD) adjust after addition 18. DAS-Decimal(BCD) adjust after subtraction 19. CBW-Fill upper byte or word with copies of sign bit of lower byte 20. CWD-Fill upper word of double word with sign bit of lower word 11
  • 12. String Instructions  There are very strong set of string instructions in 8086.  By using these string instructions, the size of the program is considerably reduced. 1. REPE/REPZ-Repeat instruction on until CX=O or ZF not equals to 1 2. REP-Repeat instruction on until CX=O 3. MOVS/MOVSB/MOVSW-Move byte or word from one string to another 21-Nov-2010 12
  • 13. String Instructions 4. REPNE/REPNZ-Repeat until CX=O or ZF=1 5. CMPS/CMPSB/CMPSW-Compare two string bytes or two string words 6. SCAS/SCASB/SCASW-Scan a string. Compare a string byte with a byte in AL or a string word with a word in AX 21-Nov-2010 ohmshankar.ece@act.edu.in 13
  • 14. Conditional Jump Table Mnemonic Meaning Jump Condition JA Jump if Above CF = 0 and ZF = 0 JAE Jump if Above or Equal CF = 0 JB Jump if Below CF = 1 JBE Jump if Below or Equal CF = 1 or ZF = 1 JC Jump if Carry CF = 1 JE/JZ Jump if Equal ZF = 1 JNC Jump if Not Carry CF = 0 JNE Jump if Not Equal ZF = 0 JNZ Jump if Not Zero ZF = 0 JPE Jump if Parity Even PF = 1 JPO Jump if Parity Odd PF = 0 JMP Unconditional Jump - 14
  • 15. Branch & Loop Inst. 1. CALL-Call a procedure(sub-program),save return address on stack 2. RET- Return from procedure to calling program 3. JNO-Jump if not overflow(OF=0) 4. JO-Jump if OF=1 5. JS-Jump if SF=1 6. INTO-Interrupt program execution if OF=1 7. LOOP-Loop through a sequence of instructions until CX=O 15
  • 16. Branch & Loop Inst. 8. JCXZ-Jump to specified address if CX=O. 16
  • 17. Miscellaneous Instructions 1. CLC-Clear carry flag to zero 2. STC-Set the carry flag to ONE 3. STD-Set DF=1 and decrement SP 4. CMP-Compliment the state of carry flag(CF) 5. STI-Set IE=1(Enable INTR input) 6. CLD-Clear DF=O 7. HLT-Halt the programs 8. CLI-IE=O.(Disable INTR input) 9. WAIT-wait until signal on the TEST pin is low 17
  • 18. Miscellaneous Instructions 10. NOP-No action except fetch and decode 11. LOCK-Prevents another processor from taking the bus while the adjacent instruction executes. 18
  • 19. 19