SlideShare una empresa de Scribd logo
1 de 13
Lab Report 03 Group No 10 10/10/2017
1 | L a b 0 3
IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086
Objective:
Learn how to:
 Write programs in Emu8086 using arithmetic instructions
 Write a complete assembly program.
 Use Emu8086 to execute written programs
 Use Emu8086 to execute single instruction at a time.
 Edit an existing source program.
Lab Outcomes:
Practice 8086 Emulator
Loading, verifying and saving machine code of arithmetic instructions.
Executing arithmetic instructions and tracing programs.
Arithmetic instructions: These instructions are used to perform various mathematical
operations like addition, subtraction, multiplication and division etc.
Addition instructions
1. ADD: Add specified byte to byte or word to word
2. ADC: Add with carry
3. INC: Increment specified byte or specified word by 1
4. AAA: ASCII adjust after addition
5. DAA : Decimal (BCD) adjust after addition
Subtraction instructions
1. SUB : Subtract byte from byte or word from word
2. SBB : Subtract with borrow
3. DEC : Decrement specified byte or word by 1
4. NEG : Negate or invert each bit of a specified byte or word and add 1 (2’s complement)
5. CMP : Compare two specified byte or two specified words
6. AAS : ASCII adjust after subtraction
7. DAS : Decimal adjust after subtraction
Multiplication instructions
1. MUL : Multiply unsigned byte by byte or unsigned word or word.
2. IMUL : Multiply signed bye by byte or signed word by word
3. AAM : ASCII adjust after multiplication
Division instructions
1. DIV : Divide unsigned word by byte or unsigned double word by word
2. IDIV : Divide signed word by byte or signed double word by word
3. AAD : ASCII adjust after division
4. CBW : Fill upper byte of word with copies of sign bit of lower byte
5. CWD : Fill upper word of double word with sign bit of lower word.
Lab Report 03 Group No 10 10/10/2017
2 | L a b 0 3
TASK No 1:
Write an assembly language program for 8086 in which you will store two
nonzero 8-bit numbers to AL and BL registers and perform the following
operations
1. Add both values and store the answer in CH register.
2. Subtract the value placed in BL from AL and store the answer in CL.
3. Multiply the values and store it in AX register.(with and without using
MUL instruction)
4. Divide the value at AL with BL and store the quotient in CH and
remainder in DH register.
Step No 01:
Lab Report 03 Group No 10 10/10/2017
3 | L a b 0 3
Step No 2: Moving values to AL and BL registers.
Step No 03: Adding values of AL and BL and storing into CH register.
Lab Report 03 Group No 10 10/10/2017
4 | L a b 0 3
Step No 04: Moving back value of AL from DL.
Step No 06: Subtracting values of AL and BL and storing it in CL register.
Lab Report 03 Group No 10 10/10/2017
5 | L a b 0 3
Step No 07: Multiplying both values of AL and BL registers with MUL command.
Step No 8: Multiplying both values of AL and BL registers without MUL command.
Lab Report 03 Group No 10 10/10/2017
6 | L a b 0 3
Step No 09: Moving value of AL back from DL.
Step No 10: Deviding values of AL and BL and storing quotient in CH and remainder in DH.
Lab Report 03 Group No 10 10/10/2017
7 | L a b 0 3
Table No 01
Task No 2:
Write an assembly language program for 8086 in which you will add two BCD
numbers placed in AL and BL registers. Store the final answer in DL register. If
the sum exceeds 8 bit value,store the high byte in DH register. The result must
be in BCD.
(Hint: Use JC and JNC instructions)
Example 01: Without carry
Step No 01: Coding
Instructions
AX BX CX DX CS IP SS SP BP SI DI DS ES
AL AH BL BH CL CH DL DH
MOV AL,09H 09 00 00 00 00 00 00 00 0100 0002 0100 FFFE 0000 0000 0000 0100 0100
MOV BL,02H 09 00 02 00 00 00 00 00 0100 0004 0100 FFFE 0000 0000 0000 0100 0100
MOV DL,AL 09 00 02 00 00 00 09 00 0100 0006 0100 FFFE 0000 0000 0000 0100 0100
ADD AL,BL 0B 00 02 00 00 00 09 00 0100 0008 0100 FFFE 0000 0000 0000 0100 0100
MOV CH,AL 0B 00 02 00 00 0B 09 00 0100 000A 0100 FFFE 0000 0000 0000 0100 0100
MOV AL,DL 09 00 02 00 00 0B 09 00 0100 000C 0100 FFFE 0000 0000 0000 0100 0100
SUB AL,BL 07 00 02 00 00 0B 09 00 0100 000E 0100 FFFE 0000 0000 0000 0100 0100
MOV CL,AL 07 00 02 00 07 0B 09 00 0100 0010 0100 FFFE 0000 0000 0000 0100 0100
MOV AL,DL 09 00 02 00 07 0B 09 00 0100 0012 0100 FFFE 0000 0000 0000 0100 0100
MUL BL 12 00 02 00 07 0B 09 00 0100 0014 0100 FFFE 0000 0000 0000 0100 0100
MOV AL,DL 09 00 02 00 07 0B 09 00 0100 0016 0100 FFFE 0000 0000 0000 0100 0100
MOV DH,BL 09 00 02 00 07 0B 09 02 0100 0018 0100 FFFE 0000 0000 0000 0100 0100
DEC DH 09 00 02 00 07 0B 09 01 0100 001A 0100 FFFE 0000 0000 0000 0100 0100
DEC DH 09 00 02 00 07 0B 09 00 0100 001E 0100 FFFE 0000 0000 0000 0100 0100
DIV BL 04 01 02 00 07 0B 09 00 0100 0020 0100 FFFE 0000 0000 0000 0100 0100
MOV CH,AL 04 01 02 00 07 04 09 00 0100 0022 0100 FFFE 0000 0000 0000 0100 0100
MOV DH,AH 04 01 02 00 07 04 09 01 0100 0024 0100 FFFE 0000 0000 0000 0100 0100
Lab Report 03 Group No 10 10/10/2017
8 | L a b 0 3
Step No 02: Storing values in AL,BL registers.
Step No 3: Adding values in AL and BL.
Lab Report 03 Group No 10 10/10/2017
9 | L a b 0 3
Step No 04: Storing value of AL in DL register.
Step No 05: Storing value of DX in AX and Adjusting BCD of the value stored in register
AX.
Lab Report 03 Group No 10 10/10/2017
10 | L a b 0 3
Example 2: With carry
Step No 01: Coding
Lab Report 03 Group No 10 10/10/2017
11 | L a b 0 3
Step No 02: Storing values in AL and BL registers.
Step No 3:Adding values of AL and BL, storing in DL and carry in DH.
Lab Report 03 Group No 10 10/10/2017
12 | L a b 0 3
Step No 04: Adjusting BCD using DAA command.
Lab Report 03 Group No 10 10/10/2017
13 | L a b 0 3
Table No 02
Instructions
AX BX CX DX CS IP SS SP BP SI DI DS ES
AL AH BL BH CL CH DL DH
MOV AL,0F0H F0 00 00 00 00 00 00 00 0100 0002 0100 FFFE 0000 0000 0000 0100 0100
MOV BL,014H F0 00 14 00 00 00 00 00 0100 0004 0100 FFFE 0000 0000 0000 0100 0100
ADD AL,BL 04 00 14 00 00 00 00 00 0100 0006 0100 FFFE 0000 0000 0000 0100 0100
INCDH 04 00 14 00 00 0B 00 01 0100 000A 0100 FFFE 0000 0000 0000 0100 0100
MOV DL,AL 04 00 14 00 00 0B 04 01 0100 000C 0100 FFFE 0000 0000 0000 0100 0100
MOV AX,DX 04 01 14 00 00 0B 04 01 0100 000E 0100 FFFE 0000 0000 0000 0100 0100
DAA 64 01 14 00 00 0B 04 01 0100 0010 0100 FFFE 0000 0000 0000 0100 0100

Más contenido relacionado

La actualidad más candente

Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 MicroprocessorNahian Ahmed
 
Binary and hex input/output (in 8086 assembuly langyage)
Binary and hex input/output (in 8086 assembuly langyage)Binary and hex input/output (in 8086 assembuly langyage)
Binary and hex input/output (in 8086 assembuly langyage)Bilal Amjad
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Bilal Amjad
 
Addressing modes 8085
Addressing modes 8085Addressing modes 8085
Addressing modes 8085ShivamSood22
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipeliningMazin Alwaaly
 
Assembly Language and microprocessor
Assembly Language and microprocessorAssembly Language and microprocessor
Assembly Language and microprocessorKhaled Sany
 
Unit 3 – assembly language programming
Unit 3 – assembly language programmingUnit 3 – assembly language programming
Unit 3 – assembly language programmingKartik Sharma
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086saurav kumar
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086Mahalakshmiv11
 
Addressing modes of 8086 - Binu Joy
Addressing modes of 8086 - Binu JoyAddressing modes of 8086 - Binu Joy
Addressing modes of 8086 - Binu JoyBinu Joy
 
T-states in microprocessor 8085
T-states in microprocessor 8085T-states in microprocessor 8085
T-states in microprocessor 8085yedles
 
Interrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kInterrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kVijay Kumar
 
Addressing Modes Of 8086
Addressing Modes Of 8086Addressing Modes Of 8086
Addressing Modes Of 8086Ikhlas Rahman
 

La actualidad más candente (20)

Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 Microprocessor
 
Binary and hex input/output (in 8086 assembuly langyage)
Binary and hex input/output (in 8086 assembuly langyage)Binary and hex input/output (in 8086 assembuly langyage)
Binary and hex input/output (in 8086 assembuly langyage)
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
 
Addressing modes 8085
Addressing modes 8085Addressing modes 8085
Addressing modes 8085
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipelining
 
Assembly Language and microprocessor
Assembly Language and microprocessorAssembly Language and microprocessor
Assembly Language and microprocessor
 
Unit 3 – assembly language programming
Unit 3 – assembly language programmingUnit 3 – assembly language programming
Unit 3 – assembly language programming
 
Unit 4-booth algorithm
Unit 4-booth algorithmUnit 4-booth algorithm
Unit 4-booth algorithm
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction set
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
 
Addressing modes of 8086 - Binu Joy
Addressing modes of 8086 - Binu JoyAddressing modes of 8086 - Binu Joy
Addressing modes of 8086 - Binu Joy
 
Module 1 8086
Module 1 8086Module 1 8086
Module 1 8086
 
Instruction formats-in-8086
Instruction formats-in-8086Instruction formats-in-8086
Instruction formats-in-8086
 
Instruction format
Instruction formatInstruction format
Instruction format
 
Register Organization of 80386
Register Organization of 80386Register Organization of 80386
Register Organization of 80386
 
T-states in microprocessor 8085
T-states in microprocessor 8085T-states in microprocessor 8085
T-states in microprocessor 8085
 
Interrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kInterrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.k
 
8086 alp
8086 alp8086 alp
8086 alp
 
Addressing Modes Of 8086
Addressing Modes Of 8086Addressing Modes Of 8086
Addressing Modes Of 8086
 

Similar a IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086

implementation of data instrucions in emu8086
implementation of data instrucions in emu8086implementation of data instrucions in emu8086
implementation of data instrucions in emu8086COMSATS Abbottabad
 
15CS44 MP & MC Module 2
15CS44 MP & MC Module  215CS44 MP & MC Module  2
15CS44 MP & MC Module 2RLJIT
 
Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...
Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...
Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...warda aziz
 
8086 instructions
8086 instructions8086 instructions
8086 instructionsRavi Anand
 
INTEL 8085 DATA FORMAT AND INSTRUCTIONS
INTEL 8085 DATA FORMAT AND INSTRUCTIONSINTEL 8085 DATA FORMAT AND INSTRUCTIONS
INTEL 8085 DATA FORMAT AND INSTRUCTIONSSwapnil Mishra
 
Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085Shubham Singh
 
8085 Assembly language programs.pdf
8085 Assembly language programs.pdf8085 Assembly language programs.pdf
8085 Assembly language programs.pdfRahulMishra122561
 
Assembly Language Programming Of 8085
Assembly Language Programming Of 8085Assembly Language Programming Of 8085
Assembly Language Programming Of 8085techbed
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086aviban
 
Microcontroller 8051- soft.ppt
Microcontroller 8051- soft.pptMicrocontroller 8051- soft.ppt
Microcontroller 8051- soft.pptsteffydean
 
Instruction set class
Instruction set   classInstruction set   class
Instruction set classshiji v r
 
Instruction set of 8085
Instruction set  of 8085Instruction set  of 8085
Instruction set of 8085shiji v r
 
Programming with 8085-Microprocessor and interfacing
Programming with 8085-Microprocessor and interfacingProgramming with 8085-Microprocessor and interfacing
Programming with 8085-Microprocessor and interfacingAmitabh Shukla
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction setJLoknathDora
 
Code Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorCode Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorMOHIT AGARWAL
 

Similar a IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086 (20)

implementation of data instrucions in emu8086
implementation of data instrucions in emu8086implementation of data instrucions in emu8086
implementation of data instrucions in emu8086
 
15CS44 MP & MC Module 2
15CS44 MP & MC Module  215CS44 MP & MC Module  2
15CS44 MP & MC Module 2
 
Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...
Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...
Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...
 
8086 instructions
8086 instructions8086 instructions
8086 instructions
 
INTEL 8085 DATA FORMAT AND INSTRUCTIONS
INTEL 8085 DATA FORMAT AND INSTRUCTIONSINTEL 8085 DATA FORMAT AND INSTRUCTIONS
INTEL 8085 DATA FORMAT AND INSTRUCTIONS
 
Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085
 
8085 Assembly language programs.pdf
8085 Assembly language programs.pdf8085 Assembly language programs.pdf
8085 Assembly language programs.pdf
 
Assembly Language Programming Of 8085
Assembly Language Programming Of 8085Assembly Language Programming Of 8085
Assembly Language Programming Of 8085
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Programming with 8085
Programming with 8085Programming with 8085
Programming with 8085
 
Microcontroller 8051- soft.ppt
Microcontroller 8051- soft.pptMicrocontroller 8051- soft.ppt
Microcontroller 8051- soft.ppt
 
Instruction set class
Instruction set   classInstruction set   class
Instruction set class
 
Instruction set of 8085
Instruction set  of 8085Instruction set  of 8085
Instruction set of 8085
 
Programming with 8085-Microprocessor and interfacing
Programming with 8085-Microprocessor and interfacingProgramming with 8085-Microprocessor and interfacing
Programming with 8085-Microprocessor and interfacing
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction set
 
Arithmetic instrctions
Arithmetic instrctionsArithmetic instrctions
Arithmetic instrctions
 
Mod-2.pptx
Mod-2.pptxMod-2.pptx
Mod-2.pptx
 
Module 2 (1).pptx
Module 2 (1).pptxModule 2 (1).pptx
Module 2 (1).pptx
 
UNIT II.pptx
UNIT II.pptxUNIT II.pptx
UNIT II.pptx
 
Code Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorCode Conversion in 8085 Microprocessor
Code Conversion in 8085 Microprocessor
 

Más de COMSATS Abbottabad

Analysis of Electro-Mechanical System
Analysis of Electro-Mechanical SystemAnalysis of Electro-Mechanical System
Analysis of Electro-Mechanical SystemCOMSATS Abbottabad
 
coding and burning program in FPGA
coding and burning program in FPGAcoding and burning program in FPGA
coding and burning program in FPGACOMSATS Abbottabad
 
Fabrication process of Integrated Circuit (IC's)
Fabrication process of Integrated Circuit (IC's)Fabrication process of Integrated Circuit (IC's)
Fabrication process of Integrated Circuit (IC's)COMSATS Abbottabad
 
Addition, subtraction and multiplication in assembly language
Addition, subtraction and multiplication in assembly languageAddition, subtraction and multiplication in assembly language
Addition, subtraction and multiplication in assembly languageCOMSATS Abbottabad
 
Mathematical Modelling of Electro-Mechanical System in Matlab
Mathematical Modelling of Electro-Mechanical System in MatlabMathematical Modelling of Electro-Mechanical System in Matlab
Mathematical Modelling of Electro-Mechanical System in MatlabCOMSATS Abbottabad
 
Mathematical Modelling of Electrical/Mechanical modellinng in MATLAB
Mathematical Modelling of Electrical/Mechanical modellinng in MATLABMathematical Modelling of Electrical/Mechanical modellinng in MATLAB
Mathematical Modelling of Electrical/Mechanical modellinng in MATLABCOMSATS Abbottabad
 
Aurduino coding for transformer interfacing
Aurduino coding for transformer interfacingAurduino coding for transformer interfacing
Aurduino coding for transformer interfacingCOMSATS Abbottabad
 
Transformer Interfacing with Laptop
Transformer Interfacing with LaptopTransformer Interfacing with Laptop
Transformer Interfacing with LaptopCOMSATS Abbottabad
 
Temperature control Switch and Display By Led
Temperature control Switch and Display By LedTemperature control Switch and Display By Led
Temperature control Switch and Display By LedCOMSATS Abbottabad
 

Más de COMSATS Abbottabad (20)

Kalman filter
Kalman filterKalman filter
Kalman filter
 
Enterpreneurship
EnterpreneurshipEnterpreneurship
Enterpreneurship
 
Sine wave inverter
Sine wave inverterSine wave inverter
Sine wave inverter
 
Light Tracking Solar Panel
Light Tracking Solar PanelLight Tracking Solar Panel
Light Tracking Solar Panel
 
Analysis of Electro-Mechanical System
Analysis of Electro-Mechanical SystemAnalysis of Electro-Mechanical System
Analysis of Electro-Mechanical System
 
coding and burning program in FPGA
coding and burning program in FPGAcoding and burning program in FPGA
coding and burning program in FPGA
 
8 bit full adder
8 bit full adder8 bit full adder
8 bit full adder
 
Fabrication process of Integrated Circuit (IC's)
Fabrication process of Integrated Circuit (IC's)Fabrication process of Integrated Circuit (IC's)
Fabrication process of Integrated Circuit (IC's)
 
Addition, subtraction and multiplication in assembly language
Addition, subtraction and multiplication in assembly languageAddition, subtraction and multiplication in assembly language
Addition, subtraction and multiplication in assembly language
 
Mathematical Modelling of Electro-Mechanical System in Matlab
Mathematical Modelling of Electro-Mechanical System in MatlabMathematical Modelling of Electro-Mechanical System in Matlab
Mathematical Modelling of Electro-Mechanical System in Matlab
 
Mathematical Modelling of Electrical/Mechanical modellinng in MATLAB
Mathematical Modelling of Electrical/Mechanical modellinng in MATLABMathematical Modelling of Electrical/Mechanical modellinng in MATLAB
Mathematical Modelling of Electrical/Mechanical modellinng in MATLAB
 
Introduction to MATLAB
Introduction to MATLAB Introduction to MATLAB
Introduction to MATLAB
 
Encoder + decoder
Encoder + decoderEncoder + decoder
Encoder + decoder
 
Principles of Communication
Principles of CommunicationPrinciples of Communication
Principles of Communication
 
Aurduino coding for transformer interfacing
Aurduino coding for transformer interfacingAurduino coding for transformer interfacing
Aurduino coding for transformer interfacing
 
Transformer Interfacing with Laptop
Transformer Interfacing with LaptopTransformer Interfacing with Laptop
Transformer Interfacing with Laptop
 
Temperature control Switch and Display By Led
Temperature control Switch and Display By LedTemperature control Switch and Display By Led
Temperature control Switch and Display By Led
 
stress and strain
stress and strainstress and strain
stress and strain
 
Generating PM wave
Generating PM wave Generating PM wave
Generating PM wave
 
Generating FM wave
Generating FM waveGenerating FM wave
Generating FM wave
 

Último

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
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
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
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 

Último (20)

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
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
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
 
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
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 

IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086

  • 1. Lab Report 03 Group No 10 10/10/2017 1 | L a b 0 3 IMPLEMENTING ARITHMETIC INSTRUCTIONS IN EMU 8086 Objective: Learn how to:  Write programs in Emu8086 using arithmetic instructions  Write a complete assembly program.  Use Emu8086 to execute written programs  Use Emu8086 to execute single instruction at a time.  Edit an existing source program. Lab Outcomes: Practice 8086 Emulator Loading, verifying and saving machine code of arithmetic instructions. Executing arithmetic instructions and tracing programs. Arithmetic instructions: These instructions are used to perform various mathematical operations like addition, subtraction, multiplication and division etc. Addition instructions 1. ADD: Add specified byte to byte or word to word 2. ADC: Add with carry 3. INC: Increment specified byte or specified word by 1 4. AAA: ASCII adjust after addition 5. DAA : Decimal (BCD) adjust after addition Subtraction instructions 1. SUB : Subtract byte from byte or word from word 2. SBB : Subtract with borrow 3. DEC : Decrement specified byte or word by 1 4. NEG : Negate or invert each bit of a specified byte or word and add 1 (2’s complement) 5. CMP : Compare two specified byte or two specified words 6. AAS : ASCII adjust after subtraction 7. DAS : Decimal adjust after subtraction Multiplication instructions 1. MUL : Multiply unsigned byte by byte or unsigned word or word. 2. IMUL : Multiply signed bye by byte or signed word by word 3. AAM : ASCII adjust after multiplication Division instructions 1. DIV : Divide unsigned word by byte or unsigned double word by word 2. IDIV : Divide signed word by byte or signed double word by word 3. AAD : ASCII adjust after division 4. CBW : Fill upper byte of word with copies of sign bit of lower byte 5. CWD : Fill upper word of double word with sign bit of lower word.
  • 2. Lab Report 03 Group No 10 10/10/2017 2 | L a b 0 3 TASK No 1: Write an assembly language program for 8086 in which you will store two nonzero 8-bit numbers to AL and BL registers and perform the following operations 1. Add both values and store the answer in CH register. 2. Subtract the value placed in BL from AL and store the answer in CL. 3. Multiply the values and store it in AX register.(with and without using MUL instruction) 4. Divide the value at AL with BL and store the quotient in CH and remainder in DH register. Step No 01:
  • 3. Lab Report 03 Group No 10 10/10/2017 3 | L a b 0 3 Step No 2: Moving values to AL and BL registers. Step No 03: Adding values of AL and BL and storing into CH register.
  • 4. Lab Report 03 Group No 10 10/10/2017 4 | L a b 0 3 Step No 04: Moving back value of AL from DL. Step No 06: Subtracting values of AL and BL and storing it in CL register.
  • 5. Lab Report 03 Group No 10 10/10/2017 5 | L a b 0 3 Step No 07: Multiplying both values of AL and BL registers with MUL command. Step No 8: Multiplying both values of AL and BL registers without MUL command.
  • 6. Lab Report 03 Group No 10 10/10/2017 6 | L a b 0 3 Step No 09: Moving value of AL back from DL. Step No 10: Deviding values of AL and BL and storing quotient in CH and remainder in DH.
  • 7. Lab Report 03 Group No 10 10/10/2017 7 | L a b 0 3 Table No 01 Task No 2: Write an assembly language program for 8086 in which you will add two BCD numbers placed in AL and BL registers. Store the final answer in DL register. If the sum exceeds 8 bit value,store the high byte in DH register. The result must be in BCD. (Hint: Use JC and JNC instructions) Example 01: Without carry Step No 01: Coding Instructions AX BX CX DX CS IP SS SP BP SI DI DS ES AL AH BL BH CL CH DL DH MOV AL,09H 09 00 00 00 00 00 00 00 0100 0002 0100 FFFE 0000 0000 0000 0100 0100 MOV BL,02H 09 00 02 00 00 00 00 00 0100 0004 0100 FFFE 0000 0000 0000 0100 0100 MOV DL,AL 09 00 02 00 00 00 09 00 0100 0006 0100 FFFE 0000 0000 0000 0100 0100 ADD AL,BL 0B 00 02 00 00 00 09 00 0100 0008 0100 FFFE 0000 0000 0000 0100 0100 MOV CH,AL 0B 00 02 00 00 0B 09 00 0100 000A 0100 FFFE 0000 0000 0000 0100 0100 MOV AL,DL 09 00 02 00 00 0B 09 00 0100 000C 0100 FFFE 0000 0000 0000 0100 0100 SUB AL,BL 07 00 02 00 00 0B 09 00 0100 000E 0100 FFFE 0000 0000 0000 0100 0100 MOV CL,AL 07 00 02 00 07 0B 09 00 0100 0010 0100 FFFE 0000 0000 0000 0100 0100 MOV AL,DL 09 00 02 00 07 0B 09 00 0100 0012 0100 FFFE 0000 0000 0000 0100 0100 MUL BL 12 00 02 00 07 0B 09 00 0100 0014 0100 FFFE 0000 0000 0000 0100 0100 MOV AL,DL 09 00 02 00 07 0B 09 00 0100 0016 0100 FFFE 0000 0000 0000 0100 0100 MOV DH,BL 09 00 02 00 07 0B 09 02 0100 0018 0100 FFFE 0000 0000 0000 0100 0100 DEC DH 09 00 02 00 07 0B 09 01 0100 001A 0100 FFFE 0000 0000 0000 0100 0100 DEC DH 09 00 02 00 07 0B 09 00 0100 001E 0100 FFFE 0000 0000 0000 0100 0100 DIV BL 04 01 02 00 07 0B 09 00 0100 0020 0100 FFFE 0000 0000 0000 0100 0100 MOV CH,AL 04 01 02 00 07 04 09 00 0100 0022 0100 FFFE 0000 0000 0000 0100 0100 MOV DH,AH 04 01 02 00 07 04 09 01 0100 0024 0100 FFFE 0000 0000 0000 0100 0100
  • 8. Lab Report 03 Group No 10 10/10/2017 8 | L a b 0 3 Step No 02: Storing values in AL,BL registers. Step No 3: Adding values in AL and BL.
  • 9. Lab Report 03 Group No 10 10/10/2017 9 | L a b 0 3 Step No 04: Storing value of AL in DL register. Step No 05: Storing value of DX in AX and Adjusting BCD of the value stored in register AX.
  • 10. Lab Report 03 Group No 10 10/10/2017 10 | L a b 0 3 Example 2: With carry Step No 01: Coding
  • 11. Lab Report 03 Group No 10 10/10/2017 11 | L a b 0 3 Step No 02: Storing values in AL and BL registers. Step No 3:Adding values of AL and BL, storing in DL and carry in DH.
  • 12. Lab Report 03 Group No 10 10/10/2017 12 | L a b 0 3 Step No 04: Adjusting BCD using DAA command.
  • 13. Lab Report 03 Group No 10 10/10/2017 13 | L a b 0 3 Table No 02 Instructions AX BX CX DX CS IP SS SP BP SI DI DS ES AL AH BL BH CL CH DL DH MOV AL,0F0H F0 00 00 00 00 00 00 00 0100 0002 0100 FFFE 0000 0000 0000 0100 0100 MOV BL,014H F0 00 14 00 00 00 00 00 0100 0004 0100 FFFE 0000 0000 0000 0100 0100 ADD AL,BL 04 00 14 00 00 00 00 00 0100 0006 0100 FFFE 0000 0000 0000 0100 0100 INCDH 04 00 14 00 00 0B 00 01 0100 000A 0100 FFFE 0000 0000 0000 0100 0100 MOV DL,AL 04 00 14 00 00 0B 04 01 0100 000C 0100 FFFE 0000 0000 0000 0100 0100 MOV AX,DX 04 01 14 00 00 0B 04 01 0100 000E 0100 FFFE 0000 0000 0000 0100 0100 DAA 64 01 14 00 00 0B 04 01 0100 0010 0100 FFFE 0000 0000 0000 0100 0100