SlideShare a Scribd company logo
COMPUTER ORGANIZATION
& ASSEMBLY LANGUAGE
LECTURE # 1 WEEK 11 PRACTICAL
BY MUHAMMAD JAFER
1
MULTIPLICATION (MUL)
• Byte * Byte
• Operand in AL
• Second Operand Register or Memory
• Result in AX
• Word * Word
• Operand in AX
• Second Operand Register or Memory
• Result in AX,DX
• AX=lower Word, DX=Higher Word
• Word * Byte
• Operand in AL & AH =0
• Results stores in AX & DX
2
DIVISION (DIV)
• Byte over Byte
• Numerator in AL and AH=0
• Denumerator is in Register or Memory
• Quotient in AL & Remainder in AH
• Word over Word
• Numerator in AX and DX=0
• Denumerator is in Register or Memory
• Quotient in AX & Remainder in DX
• Word over Byte
• Numerator in AX
• Denumerator is in Register or Memory
• Quotient in AL & Remainder in AH
• Double Word over Word
• Numerator in AX (LSW) and DX (MSW)
• Denumerator is in Register or Memory
• Quotient in AX & Remainder in DX
3
SHIFT
• SHR
• SHL
4
BCD NUMBER SYSTEM
• Binary Coded Decimal
• Binary representation of 0 to 9
• Two Types
• Unpacked BCD
• Uses 1 Byte for representation
• Lower 4 bit represents the number
• Others are 0
• Packed BCD
• Uses 1 Byte Representation
• Use two set of 4 bytes to represent two
Numbers
5
ASCII NUMBERS
• Use is same as of BCD
• A standard in USA
• ASCII is in Hexdecimal
• A device that uses ASCII has to communicate
with BCD and vise versa
• Conversions
6
CONVERSIONS
• Getting rid of 011 from ASCII Number
• ASCII to unpacked BCD
• AND ASCII Number with 00001111 (0F)
• ASCII to packed BCD
• Two ASCII Numbers to one BCD
• Convert two ASCII Numbers to unpacked BCD
• Combine two unpacked BCD to packed BCD
7
CONVERSIONS
• Getting rid of 011 from ASCII Number
• ASCII to unpacked BCD
• AND ASCII Number with 00001111 (0F)
• ASCII to packed BCD
• Two ASCII Numbers to one BCD
• Convert two ASCII Numbers to unpacked BCD
• Combine two unpacked BCD to packed BCD
8
ADD AND SUB IN BCD
• DAA
• Use after add
• DAS
• User after sub
9
ROTATE
• ROR
• ROL
• RCR
• RCL
10
CHAPTER REVIEW
• The x86 PC Assembly Language, Design &
Interfacing
• Chapter # 3
• Unsigned Addition & Substraction.
• Unsigned Multiplication & Division.
• Logic Instructions
• BCD & ASCII Conversion
• Rotate Instructions
• Bitwise Operation in The C Language
11
INTERRUPTS (INT)
• Subroutine of BIOS & OS
• INT xxx
• 00 to FF
• 256 interrupts in X86
12
INT 10H
• Burned into ROM of BIOS
• Associated with monitor screen
• Perform different function based upon value in AH
• Function Performed are
• Clearing Screen
• Change the cursor position
• Change the screen color
• Draw line on screen
13
MONITOR SCREEN IN TEXT MODE
• 80 columns & 25 rows
• 80 characters wide by 25 character long
• 80 column = 00 to 79
• 25 rows= 00 to 24
• First column is at 00,00
14
CLEARING SCREEN
• AH=06
• AL=00
• BH=07
• CX=0000
• DH=24
• DL=79
• INT 10H
15
SET CURSOR LOCATION
• AH=02
• BH=00
• DH=24
• DL=59
• INT 10H
16
GET CURSOR LOCATION
• AH=03
• BH=00
• INT 10H
17
CHAPTER REVIEW
• The x86 PC Assembly Language, Design &
Interfacing
• Chapter # 4
• BIOS INT 10H PROGRAMMING
18

More Related Content

Viewers also liked

Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
Loredana Cuceu
 
Internship Report
Internship ReportInternship Report
Internship Report
Muhammad Ali
 
QMS_OF KING KONG SECURITY
QMS_OF KING KONG SECURITYQMS_OF KING KONG SECURITY
QMS_OF KING KONG SECURITY
Mr Nembudani
 
Tic.
Tic.Tic.
internship report
internship reportinternship report
internship report
Taha Mansoor
 
Types of sampling design
Types of sampling designTypes of sampling design
Types of sampling design
DEVIKA S INDU
 
Econ408 population and sampling
Econ408 population and samplingEcon408 population and sampling
Econ408 population and sampling
Chiang Mai University
 
FRACTURA NASAL: DIAGNOSTICO Y TRATAMIENTO. I PARTE.e
FRACTURA NASAL: DIAGNOSTICO Y TRATAMIENTO. I PARTE.eFRACTURA NASAL: DIAGNOSTICO Y TRATAMIENTO. I PARTE.e
FRACTURA NASAL: DIAGNOSTICO Y TRATAMIENTO. I PARTE.e
Edwin José Calderón Flores
 

Viewers also liked (8)

Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
 
Internship Report
Internship ReportInternship Report
Internship Report
 
QMS_OF KING KONG SECURITY
QMS_OF KING KONG SECURITYQMS_OF KING KONG SECURITY
QMS_OF KING KONG SECURITY
 
Tic.
Tic.Tic.
Tic.
 
internship report
internship reportinternship report
internship report
 
Types of sampling design
Types of sampling designTypes of sampling design
Types of sampling design
 
Econ408 population and sampling
Econ408 population and samplingEcon408 population and sampling
Econ408 population and sampling
 
FRACTURA NASAL: DIAGNOSTICO Y TRATAMIENTO. I PARTE.e
FRACTURA NASAL: DIAGNOSTICO Y TRATAMIENTO. I PARTE.eFRACTURA NASAL: DIAGNOSTICO Y TRATAMIENTO. I PARTE.e
FRACTURA NASAL: DIAGNOSTICO Y TRATAMIENTO. I PARTE.e
 

Similar to Coal 17 - arithematic operation in Assembly Programming

Assembly 8086
Assembly 8086Assembly 8086
Assembly 8086
Mustafa Salah
 
Introduction to Assembly Language & various basic things
Introduction to Assembly Language & various basic thingsIntroduction to Assembly Language & various basic things
Introduction to Assembly Language & various basic things
ishitasabrincse
 
8086 Instruction set
8086 Instruction set8086 Instruction set
8086 Instruction set
karthiga selvaraju
 
15CS44 MP &MC Module 3
15CS44 MP &MC Module 315CS44 MP &MC Module 3
15CS44 MP &MC Module 3
RLJIT
 
Arithmetic instrctions
Arithmetic instrctionsArithmetic instrctions
Arithmetic instrctions
HarshitParkar6677
 
Notes arithmetic instructions
Notes arithmetic instructionsNotes arithmetic instructions
Notes arithmetic instructions
HarshitParkar6677
 
microcomputer architecture - Arithmetic instruction
microcomputer architecture - Arithmetic instructionmicrocomputer architecture - Arithmetic instruction
microcomputer architecture - Arithmetic instruction
ramya marichamy
 
Instruction sets picc done by Priyanga KR
Instruction sets   picc done by Priyanga KRInstruction sets   picc done by Priyanga KR
Instruction sets picc done by Priyanga KR
PriyangaKR1
 
Shift rotate
Shift rotateShift rotate
Shift rotate
fika sweety
 
Coal 9 pipelining in Assembly Programming
Coal 9 pipelining in Assembly ProgrammingCoal 9 pipelining in Assembly Programming
Coal 9 pipelining in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
arm.pptx
arm.pptxarm.pptx
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
Tirumalesh Nizampatnam
 
Module 2 PPT of ES.pptx
Module 2 PPT of ES.pptxModule 2 PPT of ES.pptx
Module 2 PPT of ES.pptx
shruthi810379
 
8086 microprocessor assembler directives.ppt
8086   microprocessor assembler directives.ppt8086   microprocessor assembler directives.ppt
8086 microprocessor assembler directives.ppt
NaveenKumar5162
 
POWER processor and features presentation
POWER processor and features presentationPOWER processor and features presentation
POWER processor and features presentation
Ganesan Narayanasamy
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes
Kanika Thakur
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes
Sher Shah Merkhel
 
15CS44 MP & MC Module 2
15CS44 MP & MC Module  215CS44 MP & MC Module  2
15CS44 MP & MC Module 2
RLJIT
 
06 mips-isa
06 mips-isa06 mips-isa
06 mips-isa
Waqar Jamil
 
Microprocessor.pptx
Microprocessor.pptxMicroprocessor.pptx
Microprocessor.pptx
NishatNishu5
 

Similar to Coal 17 - arithematic operation in Assembly Programming (20)

Assembly 8086
Assembly 8086Assembly 8086
Assembly 8086
 
Introduction to Assembly Language & various basic things
Introduction to Assembly Language & various basic thingsIntroduction to Assembly Language & various basic things
Introduction to Assembly Language & various basic things
 
8086 Instruction set
8086 Instruction set8086 Instruction set
8086 Instruction set
 
15CS44 MP &MC Module 3
15CS44 MP &MC Module 315CS44 MP &MC Module 3
15CS44 MP &MC Module 3
 
Arithmetic instrctions
Arithmetic instrctionsArithmetic instrctions
Arithmetic instrctions
 
Notes arithmetic instructions
Notes arithmetic instructionsNotes arithmetic instructions
Notes arithmetic instructions
 
microcomputer architecture - Arithmetic instruction
microcomputer architecture - Arithmetic instructionmicrocomputer architecture - Arithmetic instruction
microcomputer architecture - Arithmetic instruction
 
Instruction sets picc done by Priyanga KR
Instruction sets   picc done by Priyanga KRInstruction sets   picc done by Priyanga KR
Instruction sets picc done by Priyanga KR
 
Shift rotate
Shift rotateShift rotate
Shift rotate
 
Coal 9 pipelining in Assembly Programming
Coal 9 pipelining in Assembly ProgrammingCoal 9 pipelining in Assembly Programming
Coal 9 pipelining in Assembly Programming
 
arm.pptx
arm.pptxarm.pptx
arm.pptx
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Module 2 PPT of ES.pptx
Module 2 PPT of ES.pptxModule 2 PPT of ES.pptx
Module 2 PPT of ES.pptx
 
8086 microprocessor assembler directives.ppt
8086   microprocessor assembler directives.ppt8086   microprocessor assembler directives.ppt
8086 microprocessor assembler directives.ppt
 
POWER processor and features presentation
POWER processor and features presentationPOWER processor and features presentation
POWER processor and features presentation
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes
 
15CS44 MP & MC Module 2
15CS44 MP & MC Module  215CS44 MP & MC Module  2
15CS44 MP & MC Module 2
 
06 mips-isa
06 mips-isa06 mips-isa
06 mips-isa
 
Microprocessor.pptx
Microprocessor.pptxMicroprocessor.pptx
Microprocessor.pptx
 

More from Muhammad Taqi Hassan Bukhari

Coal 20-int21 h in Assembly Programming
Coal 20-int21 h in Assembly ProgrammingCoal 20-int21 h in Assembly Programming
Coal 20-int21 h in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Coal 19-int10 h in Assembly Programming
Coal 19-int10 h in Assembly ProgrammingCoal 19-int10 h in Assembly Programming
Coal 19-int10 h in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Coal 18 cache in Assembly Programming
Coal 18 cache in Assembly ProgrammingCoal 18 cache in Assembly Programming
Coal 18 cache in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Coal 16 mapping in Assembly Programming
Coal 16 mapping in Assembly ProgrammingCoal 16 mapping in Assembly Programming
Coal 16 mapping in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Coal 15 memory in Assembly Programming
Coal 15 memory in Assembly ProgrammingCoal 15 memory in Assembly Programming
Coal 15 memory in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Coal 14 input output devices in Assembly Programming
Coal 14 input output devices in Assembly ProgrammingCoal 14 input output devices in Assembly Programming
Coal 14 input output devices in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Coal 11 jumps in Assembly Programming
Coal 11 jumps in Assembly ProgrammingCoal 11 jumps in Assembly Programming
Coal 11 jumps in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Coal 10 instruction cycle and interrupts in Assembly Programming
Coal 10 instruction cycle and interrupts in Assembly ProgrammingCoal 10 instruction cycle and interrupts in Assembly Programming
Coal 10 instruction cycle and interrupts in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Coal7 segmentation in Assembly Programming
Coal7 segmentation in Assembly ProgrammingCoal7 segmentation in Assembly Programming
Coal7 segmentation in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Coal 6 instruction in assembly languages in Assembly Programming
Coal 6 instruction in assembly languages in Assembly ProgrammingCoal 6 instruction in assembly languages in Assembly Programming
Coal 6 instruction in assembly languages in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Coal 5 memory reading concepts in Assembly Programming
Coal 5 memory reading concepts in Assembly ProgrammingCoal 5 memory reading concepts in Assembly Programming
Coal 5 memory reading concepts in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Coal 4 - quiz in Assembly Programming
Coal 4 - quiz in Assembly ProgrammingCoal 4 - quiz in Assembly Programming
Coal 4 - quiz in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Coal 3 history of intel evolution in Assembly Programming
Coal 3 history of intel evolution in Assembly ProgrammingCoal 3 history of intel evolution in Assembly Programming
Coal 3 history of intel evolution in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Coal 2 - concepts in Assembly Programming
Coal 2 - concepts in Assembly ProgrammingCoal 2 - concepts in Assembly Programming
Coal 2 - concepts in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Coal 1 - introduction to assembly programming in Assembly Programming
Coal 1 - introduction to assembly programming in Assembly ProgrammingCoal 1 - introduction to assembly programming in Assembly Programming
Coal 1 - introduction to assembly programming in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Coal 21- macro in Assembly Programming
Coal 21- macro in Assembly ProgrammingCoal 21- macro in Assembly Programming
Coal 21- macro in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Various type of register
Various type of registerVarious type of register
Various type of register
Muhammad Taqi Hassan Bukhari
 
MSF process model
MSF process modelMSF process model
MSF process model
Muhammad Taqi Hassan Bukhari
 
HRM Short Handouts - Taqi Hassan
HRM Short Handouts - Taqi HassanHRM Short Handouts - Taqi Hassan
HRM Short Handouts - Taqi Hassan
Muhammad Taqi Hassan Bukhari
 
HRM Short notes - Taqi Hassan
HRM Short notes - Taqi HassanHRM Short notes - Taqi Hassan
HRM Short notes - Taqi Hassan
Muhammad Taqi Hassan Bukhari
 

More from Muhammad Taqi Hassan Bukhari (20)

Coal 20-int21 h in Assembly Programming
Coal 20-int21 h in Assembly ProgrammingCoal 20-int21 h in Assembly Programming
Coal 20-int21 h in Assembly Programming
 
Coal 19-int10 h in Assembly Programming
Coal 19-int10 h in Assembly ProgrammingCoal 19-int10 h in Assembly Programming
Coal 19-int10 h in Assembly Programming
 
Coal 18 cache in Assembly Programming
Coal 18 cache in Assembly ProgrammingCoal 18 cache in Assembly Programming
Coal 18 cache in Assembly Programming
 
Coal 16 mapping in Assembly Programming
Coal 16 mapping in Assembly ProgrammingCoal 16 mapping in Assembly Programming
Coal 16 mapping in Assembly Programming
 
Coal 15 memory in Assembly Programming
Coal 15 memory in Assembly ProgrammingCoal 15 memory in Assembly Programming
Coal 15 memory in Assembly Programming
 
Coal 14 input output devices in Assembly Programming
Coal 14 input output devices in Assembly ProgrammingCoal 14 input output devices in Assembly Programming
Coal 14 input output devices in Assembly Programming
 
Coal 11 jumps in Assembly Programming
Coal 11 jumps in Assembly ProgrammingCoal 11 jumps in Assembly Programming
Coal 11 jumps in Assembly Programming
 
Coal 10 instruction cycle and interrupts in Assembly Programming
Coal 10 instruction cycle and interrupts in Assembly ProgrammingCoal 10 instruction cycle and interrupts in Assembly Programming
Coal 10 instruction cycle and interrupts in Assembly Programming
 
Coal7 segmentation in Assembly Programming
Coal7 segmentation in Assembly ProgrammingCoal7 segmentation in Assembly Programming
Coal7 segmentation in Assembly Programming
 
Coal 6 instruction in assembly languages in Assembly Programming
Coal 6 instruction in assembly languages in Assembly ProgrammingCoal 6 instruction in assembly languages in Assembly Programming
Coal 6 instruction in assembly languages in Assembly Programming
 
Coal 5 memory reading concepts in Assembly Programming
Coal 5 memory reading concepts in Assembly ProgrammingCoal 5 memory reading concepts in Assembly Programming
Coal 5 memory reading concepts in Assembly Programming
 
Coal 4 - quiz in Assembly Programming
Coal 4 - quiz in Assembly ProgrammingCoal 4 - quiz in Assembly Programming
Coal 4 - quiz in Assembly Programming
 
Coal 3 history of intel evolution in Assembly Programming
Coal 3 history of intel evolution in Assembly ProgrammingCoal 3 history of intel evolution in Assembly Programming
Coal 3 history of intel evolution in Assembly Programming
 
Coal 2 - concepts in Assembly Programming
Coal 2 - concepts in Assembly ProgrammingCoal 2 - concepts in Assembly Programming
Coal 2 - concepts in Assembly Programming
 
Coal 1 - introduction to assembly programming in Assembly Programming
Coal 1 - introduction to assembly programming in Assembly ProgrammingCoal 1 - introduction to assembly programming in Assembly Programming
Coal 1 - introduction to assembly programming in Assembly Programming
 
Coal 21- macro in Assembly Programming
Coal 21- macro in Assembly ProgrammingCoal 21- macro in Assembly Programming
Coal 21- macro in Assembly Programming
 
Various type of register
Various type of registerVarious type of register
Various type of register
 
MSF process model
MSF process modelMSF process model
MSF process model
 
HRM Short Handouts - Taqi Hassan
HRM Short Handouts - Taqi HassanHRM Short Handouts - Taqi Hassan
HRM Short Handouts - Taqi Hassan
 
HRM Short notes - Taqi Hassan
HRM Short notes - Taqi HassanHRM Short notes - Taqi Hassan
HRM Short notes - Taqi Hassan
 

Recently uploaded

The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
kalichargn70th171
 
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLESINTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
anfaltahir1010
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
kalichargn70th171
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
Reetu63
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
VALiNTRY360
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
Maitrey Patel
 
Kubernetes at Scale: Going Multi-Cluster with Istio
Kubernetes at Scale:  Going Multi-Cluster  with IstioKubernetes at Scale:  Going Multi-Cluster  with Istio
Kubernetes at Scale: Going Multi-Cluster with Istio
Severalnines
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
What’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete RoadmapWhat’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete Roadmap
Envertis Software Solutions
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 

Recently uploaded (20)

The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
 
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLESINTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
 
Kubernetes at Scale: Going Multi-Cluster with Istio
Kubernetes at Scale:  Going Multi-Cluster  with IstioKubernetes at Scale:  Going Multi-Cluster  with Istio
Kubernetes at Scale: Going Multi-Cluster with Istio
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
What’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete RoadmapWhat’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete Roadmap
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 

Coal 17 - arithematic operation in Assembly Programming

  • 1. COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE LECTURE # 1 WEEK 11 PRACTICAL BY MUHAMMAD JAFER 1
  • 2. MULTIPLICATION (MUL) • Byte * Byte • Operand in AL • Second Operand Register or Memory • Result in AX • Word * Word • Operand in AX • Second Operand Register or Memory • Result in AX,DX • AX=lower Word, DX=Higher Word • Word * Byte • Operand in AL & AH =0 • Results stores in AX & DX 2
  • 3. DIVISION (DIV) • Byte over Byte • Numerator in AL and AH=0 • Denumerator is in Register or Memory • Quotient in AL & Remainder in AH • Word over Word • Numerator in AX and DX=0 • Denumerator is in Register or Memory • Quotient in AX & Remainder in DX • Word over Byte • Numerator in AX • Denumerator is in Register or Memory • Quotient in AL & Remainder in AH • Double Word over Word • Numerator in AX (LSW) and DX (MSW) • Denumerator is in Register or Memory • Quotient in AX & Remainder in DX 3
  • 5. BCD NUMBER SYSTEM • Binary Coded Decimal • Binary representation of 0 to 9 • Two Types • Unpacked BCD • Uses 1 Byte for representation • Lower 4 bit represents the number • Others are 0 • Packed BCD • Uses 1 Byte Representation • Use two set of 4 bytes to represent two Numbers 5
  • 6. ASCII NUMBERS • Use is same as of BCD • A standard in USA • ASCII is in Hexdecimal • A device that uses ASCII has to communicate with BCD and vise versa • Conversions 6
  • 7. CONVERSIONS • Getting rid of 011 from ASCII Number • ASCII to unpacked BCD • AND ASCII Number with 00001111 (0F) • ASCII to packed BCD • Two ASCII Numbers to one BCD • Convert two ASCII Numbers to unpacked BCD • Combine two unpacked BCD to packed BCD 7
  • 8. CONVERSIONS • Getting rid of 011 from ASCII Number • ASCII to unpacked BCD • AND ASCII Number with 00001111 (0F) • ASCII to packed BCD • Two ASCII Numbers to one BCD • Convert two ASCII Numbers to unpacked BCD • Combine two unpacked BCD to packed BCD 8
  • 9. ADD AND SUB IN BCD • DAA • Use after add • DAS • User after sub 9
  • 10. ROTATE • ROR • ROL • RCR • RCL 10
  • 11. CHAPTER REVIEW • The x86 PC Assembly Language, Design & Interfacing • Chapter # 3 • Unsigned Addition & Substraction. • Unsigned Multiplication & Division. • Logic Instructions • BCD & ASCII Conversion • Rotate Instructions • Bitwise Operation in The C Language 11
  • 12. INTERRUPTS (INT) • Subroutine of BIOS & OS • INT xxx • 00 to FF • 256 interrupts in X86 12
  • 13. INT 10H • Burned into ROM of BIOS • Associated with monitor screen • Perform different function based upon value in AH • Function Performed are • Clearing Screen • Change the cursor position • Change the screen color • Draw line on screen 13
  • 14. MONITOR SCREEN IN TEXT MODE • 80 columns & 25 rows • 80 characters wide by 25 character long • 80 column = 00 to 79 • 25 rows= 00 to 24 • First column is at 00,00 14
  • 15. CLEARING SCREEN • AH=06 • AL=00 • BH=07 • CX=0000 • DH=24 • DL=79 • INT 10H 15
  • 16. SET CURSOR LOCATION • AH=02 • BH=00 • DH=24 • DL=59 • INT 10H 16
  • 17. GET CURSOR LOCATION • AH=03 • BH=00 • INT 10H 17
  • 18. CHAPTER REVIEW • The x86 PC Assembly Language, Design & Interfacing • Chapter # 4 • BIOS INT 10H PROGRAMMING 18