SlideShare uma empresa Scribd logo
1 de 6
[15B-145-EL] SamiULLAH
.MODEL SMALL
.STACK 100H
.DATA
MAIN_MENU DB ,0DH,0AH,"Calculater",0DH,0AH
DB "Press 'A' For ADDITION",0DH,0AH
DB "Press 'S' For SUBTRACTION",0DH,0AH
DB "Press 'M' For MULTIPLICATION",0DH,0AH
DB "Press 'D' For DIVISION",0DH,0AH
DB "Press 'E' For EXIT",0DH,0AH
DB "Press 'R' For RETURN to Main Menu",0DH,0AH
DB "*******************************",0DH,0AH
DB "*******************************",0DH,0AH
DB "Enter Your CHOICE",0DH,0AH,'$'
NUM1 DB "Enter First Number",0DH,0AH,'$'
NUM2 DB ,0DH,0AH,"Enter Second
Number",0DH,0AH,'$'
ADD1 DB ,0DH,0AH,"FOR ADDITION",0DH,0AH,'$'
SUB1 DB ,0DH,0AH,"FOR SUBTRACTION",0DH,0AH,'$'
MUL1 DB ,0DH,0AH,"FOR MULTIPLICATION",0DH,0AH,'$'
DIV1 DB ,0DH,0AH,"FOR DIVISION",0DH,0AH,'$'
EX DB ,0DH,0AH,"GOOD BYE AND HAVE A NICE TIME
:)",0DH,0AH,'$'
ANS DB ,0DH,0AH,"ANSWER ",0DH,0AH,'$'
CONTINUE DB ,0DH,0AH,"DO YOU WANT TO
CONTINUE",0DH,0AH,'$'
OP1 DB ?
OP2 DB ?
Operand DB ?
CON DB ?
.CODE
.STARTUP
START:
MOV AH,09H
MOV DX, OFFSET MAIN_MENU
INT 21H
MOV AH,01H
INT 21H
MOV Operand,AL
MOV AL,Operand
CMP AL,'A'
JE ADD
CMP AL,'S'
JE SUB
CMP AL,'M'
JE MUL
CMP AL,'D'
JE DIV
CMP AL,'R'
JE START
CMP AL,'E'
JE EXIT
ADD: ; PERFORMING ADDITION
MOV AH,09H
MOV DX,OFFSET ADD1
INT 21H
;FIRST OPERAND
MOV AH,09H
MOV DX,OFFSET NUM1
INT 21H
MOV AH,01H
[15B-145-EL] SamiULLAH
INT 21H
MOV OP1,AL
;SECOND OPERAND
MOV AH,09H
MOV DX,OFFSET NUM2
INT 21H
MOV AH,01H
INT 21H
MOV OP2,AL
MOV AH,09H
MOV DX, OFFSET ANS
INT 21H
MOV AL,OP1
MOV BL,OP2
ADD AL,BL
AAS
OR AX, 3030H
; PRINT RESULT
MOV AH,0EH
INT 10H
;FOR CONTINUE
MOV AH,09H
MOV DX,OFFSET CONTINUE
INT 21H
MOV AH,01H
INT 21H
MOV CON,AL
MOV AL,CON
CMP AL,'Y'
JE START
CMP AL,'N'
JE EXIT
SUB: ; PERFORMING SUBTRACTION
MOV AH,09H
MOV DX,OFFSET SUB1
INT 21H
;FIRST OPERAND
MOV AH,09H
MOV DX,OFFSET NUM1
INT 21H
MOV AH,01H
INT 21H
MOV OP1,AL
;SECOND OPERAND
MOV AH,09H
MOV DX,OFFSET NUM2
INT 21H
MOV AH,01H
INT 21H
MOV OP2,AL
MOV AH,09H
MOV DX, OFFSET ANS
INT 21H
MOV AL,OP1
MOV BL,OP2
SUB AL,BL
AAS
OR AX, 3030H
; PRINT RESULT
MOV AH,0EH
[15B-145-EL] SamiULLAH
INT 10H
;FOR CONTINUE
MOV AH,09H
MOV DX,OFFSET CONTINUE
INT 21H
MOV AH,01H
INT 21H
MOV CON,AL
MOV AL,CON
CMP AL,'Y'
JE START
CMP AL,'N'
JE EXIT
MUL: ; PERFORMING MULTIPLICATION
MOV AH,09H
MOV DX,OFFSET MUL1
INT 21H
;FIRST OPERAND
MOV AH,09H
MOV DX,OFFSET NUM1
INT 21H
MOV AH,01H
INT 21H
SUB AL,30H
MOV OP1,AL
;SECOND OPERAND
MOV AH,09H
MOV DX,OFFSET NUM2
INT 21H
MOV AH,01H
INT 21H
SUB AL,30H
MOV OP2,AL
MOV AH,09H
MOV DX, OFFSET ANS
INT 21H
MOV AL,OP1
MOV BL,OP2
MUL BL
ADD AL,30H
; PRINT RESULT
MOV AH,0EH
INT 10H
;FOR CONTINUE
MOV AH,09H
MOV DX,OFFSET CONTINUE
INT 21H
MOV AH,01H
INT 21H
MOV CON,AL
MOV AL,CON
CMP AL,'Y'
JE START
CMP AL,'N'
JE EXIT
DIV: ; PERFORMING DIVISION
MOV AH,09H
MOV DX,OFFSET DIV1
INT 21H
;FIRST OPERAND
[15B-145-EL] SamiULLAH
MOV AH,09H
MOV DX,OFFSET NUM1
INT 21H
MOV AH,01H
INT 21H
SUB AL,30H
MOV OP1,AL
;SECOND OPERAND
MOV AH,09H
MOV DX,OFFSET NUM2
INT 21H
MOV AH,01H
INT 21H
SUB AL,30H
MOV OP2,AL
MOV AH,09H
MOV DX, OFFSET ANS
INT 21H
MOV AX,0000H
MOV AL,OP1
MOV BL,OP2
DIV BL
ADD AL,30H
; PRINT RESULT
MOV AH,0EH
INT 10H
;FOR CONTINUE
MOV AH,09H
MOV DX,OFFSET CONTINUE
INT 21H
MOV AH,01H
INT 21H
MOV CON,AL
MOV AL,CON
CMP AL,'Y'
JE START
CMP AL,'N'
JE EXIT
EXIT: ; SAY GOOD BYE AND THEN EXIT
MOV AH,09H
MOV DX,OFFSET EX
INT 21H
.EXIT
END
[15B-145-EL] SamiULLAH
OUTPUT
ADDITION
SUBTRACTION
MULTIPLICATION
DIVISION
[15B-145-EL] SamiULLAH

Mais conteúdo relacionado

Mais procurados

Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...Bilal Amjad
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...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
 
Digital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationDigital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationfoyez ahammad
 
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
 
assembly language programming organization of IBM PC chapter 9 part-2(decimal...
assembly language programming organization of IBM PC chapter 9 part-2(decimal...assembly language programming organization of IBM PC chapter 9 part-2(decimal...
assembly language programming organization of IBM PC chapter 9 part-2(decimal...Bilal Amjad
 
Quine Mc Clusky (Tabular) method
Quine Mc Clusky (Tabular) methodQuine Mc Clusky (Tabular) method
Quine Mc Clusky (Tabular) methodSyed Saeed
 
Restoring and Non-Restoring division algo for CSE
Restoring and Non-Restoring division algo for CSERestoring and Non-Restoring division algo for CSE
Restoring and Non-Restoring division algo for CSEARoy10
 
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
 
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
 
Solution manual of assembly language programming and organization of the ibm ...
Solution manual of assembly language programming and organization of the ibm ...Solution manual of assembly language programming and organization of the ibm ...
Solution manual of assembly language programming and organization of the ibm ...Tayeen Ahmed
 
Digital Electronics( half adders and full adders)
Digital Electronics( half adders and full adders)Digital Electronics( half adders and full adders)
Digital Electronics( half adders and full adders)Bosa Theophilus Ntshole
 
Assembly language programming
Assembly language programmingAssembly language programming
Assembly language programminghimhk
 
KARNAUGH MAP(K-MAP)
KARNAUGH MAP(K-MAP)KARNAUGH MAP(K-MAP)
KARNAUGH MAP(K-MAP)mihir jain
 

Mais procurados (20)

Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
 
Assembly 8086
Assembly 8086Assembly 8086
Assembly 8086
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
 
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 ...
 
Ppt bubble sort
Ppt bubble sortPpt bubble sort
Ppt bubble sort
 
Digital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationDigital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentation
 
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 ...
 
assembly language programming organization of IBM PC chapter 9 part-2(decimal...
assembly language programming organization of IBM PC chapter 9 part-2(decimal...assembly language programming organization of IBM PC chapter 9 part-2(decimal...
assembly language programming organization of IBM PC chapter 9 part-2(decimal...
 
K map
K mapK map
K map
 
Quine Mc Clusky (Tabular) method
Quine Mc Clusky (Tabular) methodQuine Mc Clusky (Tabular) method
Quine Mc Clusky (Tabular) method
 
Restoring and Non-Restoring division algo for CSE
Restoring and Non-Restoring division algo for CSERestoring and Non-Restoring division algo for CSE
Restoring and Non-Restoring division algo for CSE
 
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
 
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 ...
 
Solution manual of assembly language programming and organization of the ibm ...
Solution manual of assembly language programming and organization of the ibm ...Solution manual of assembly language programming and organization of the ibm ...
Solution manual of assembly language programming and organization of the ibm ...
 
Digital Electronics( half adders and full adders)
Digital Electronics( half adders and full adders)Digital Electronics( half adders and full adders)
Digital Electronics( half adders and full adders)
 
Assembly language programming
Assembly language programmingAssembly language programming
Assembly language programming
 
8086 alp
8086 alp8086 alp
8086 alp
 
KARNAUGH MAP(K-MAP)
KARNAUGH MAP(K-MAP)KARNAUGH MAP(K-MAP)
KARNAUGH MAP(K-MAP)
 
Assignment on alp
Assignment on alpAssignment on alp
Assignment on alp
 
Multiplexers
MultiplexersMultiplexers
Multiplexers
 

Mais de Sami Ullah

The Earliest Applications Of Linear Algebra
The Earliest Applications Of Linear AlgebraThe Earliest Applications Of Linear Algebra
The Earliest Applications Of Linear AlgebraSami Ullah
 
Equilibrium Temperature Distributions Application In Linear Algebra
Equilibrium Temperature Distributions Application In Linear AlgebraEquilibrium Temperature Distributions Application In Linear Algebra
Equilibrium Temperature Distributions Application In Linear AlgebraSami Ullah
 
Electrical Networks Application in linear algebra
Electrical Networks Application in linear algebraElectrical Networks Application in linear algebra
Electrical Networks Application in linear algebraSami Ullah
 
Applications of matrices in Real\Daily life
Applications of matrices in Real\Daily lifeApplications of matrices in Real\Daily life
Applications of matrices in Real\Daily lifeSami Ullah
 
cryptography Application of linear algebra
cryptography Application of linear algebra cryptography Application of linear algebra
cryptography Application of linear algebra Sami Ullah
 
Assembly Language Voltage Divider Bias Program 8086
Assembly Language Voltage Divider Bias Program 8086Assembly Language Voltage Divider Bias Program 8086
Assembly Language Voltage Divider Bias Program 8086Sami Ullah
 

Mais de Sami Ullah (6)

The Earliest Applications Of Linear Algebra
The Earliest Applications Of Linear AlgebraThe Earliest Applications Of Linear Algebra
The Earliest Applications Of Linear Algebra
 
Equilibrium Temperature Distributions Application In Linear Algebra
Equilibrium Temperature Distributions Application In Linear AlgebraEquilibrium Temperature Distributions Application In Linear Algebra
Equilibrium Temperature Distributions Application In Linear Algebra
 
Electrical Networks Application in linear algebra
Electrical Networks Application in linear algebraElectrical Networks Application in linear algebra
Electrical Networks Application in linear algebra
 
Applications of matrices in Real\Daily life
Applications of matrices in Real\Daily lifeApplications of matrices in Real\Daily life
Applications of matrices in Real\Daily life
 
cryptography Application of linear algebra
cryptography Application of linear algebra cryptography Application of linear algebra
cryptography Application of linear algebra
 
Assembly Language Voltage Divider Bias Program 8086
Assembly Language Voltage Divider Bias Program 8086Assembly Language Voltage Divider Bias Program 8086
Assembly Language Voltage Divider Bias Program 8086
 

Último

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 

Último (20)

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 

Calculator 8086 Assembly Language Programming

  • 1. [15B-145-EL] SamiULLAH .MODEL SMALL .STACK 100H .DATA MAIN_MENU DB ,0DH,0AH,"Calculater",0DH,0AH DB "Press 'A' For ADDITION",0DH,0AH DB "Press 'S' For SUBTRACTION",0DH,0AH DB "Press 'M' For MULTIPLICATION",0DH,0AH DB "Press 'D' For DIVISION",0DH,0AH DB "Press 'E' For EXIT",0DH,0AH DB "Press 'R' For RETURN to Main Menu",0DH,0AH DB "*******************************",0DH,0AH DB "*******************************",0DH,0AH DB "Enter Your CHOICE",0DH,0AH,'$' NUM1 DB "Enter First Number",0DH,0AH,'$' NUM2 DB ,0DH,0AH,"Enter Second Number",0DH,0AH,'$' ADD1 DB ,0DH,0AH,"FOR ADDITION",0DH,0AH,'$' SUB1 DB ,0DH,0AH,"FOR SUBTRACTION",0DH,0AH,'$' MUL1 DB ,0DH,0AH,"FOR MULTIPLICATION",0DH,0AH,'$' DIV1 DB ,0DH,0AH,"FOR DIVISION",0DH,0AH,'$' EX DB ,0DH,0AH,"GOOD BYE AND HAVE A NICE TIME :)",0DH,0AH,'$' ANS DB ,0DH,0AH,"ANSWER ",0DH,0AH,'$' CONTINUE DB ,0DH,0AH,"DO YOU WANT TO CONTINUE",0DH,0AH,'$' OP1 DB ? OP2 DB ? Operand DB ? CON DB ? .CODE .STARTUP START: MOV AH,09H MOV DX, OFFSET MAIN_MENU INT 21H MOV AH,01H INT 21H MOV Operand,AL MOV AL,Operand CMP AL,'A' JE ADD CMP AL,'S' JE SUB CMP AL,'M' JE MUL CMP AL,'D' JE DIV CMP AL,'R' JE START CMP AL,'E' JE EXIT ADD: ; PERFORMING ADDITION MOV AH,09H MOV DX,OFFSET ADD1 INT 21H ;FIRST OPERAND MOV AH,09H MOV DX,OFFSET NUM1 INT 21H MOV AH,01H
  • 2. [15B-145-EL] SamiULLAH INT 21H MOV OP1,AL ;SECOND OPERAND MOV AH,09H MOV DX,OFFSET NUM2 INT 21H MOV AH,01H INT 21H MOV OP2,AL MOV AH,09H MOV DX, OFFSET ANS INT 21H MOV AL,OP1 MOV BL,OP2 ADD AL,BL AAS OR AX, 3030H ; PRINT RESULT MOV AH,0EH INT 10H ;FOR CONTINUE MOV AH,09H MOV DX,OFFSET CONTINUE INT 21H MOV AH,01H INT 21H MOV CON,AL MOV AL,CON CMP AL,'Y' JE START CMP AL,'N' JE EXIT SUB: ; PERFORMING SUBTRACTION MOV AH,09H MOV DX,OFFSET SUB1 INT 21H ;FIRST OPERAND MOV AH,09H MOV DX,OFFSET NUM1 INT 21H MOV AH,01H INT 21H MOV OP1,AL ;SECOND OPERAND MOV AH,09H MOV DX,OFFSET NUM2 INT 21H MOV AH,01H INT 21H MOV OP2,AL MOV AH,09H MOV DX, OFFSET ANS INT 21H MOV AL,OP1 MOV BL,OP2 SUB AL,BL AAS OR AX, 3030H ; PRINT RESULT MOV AH,0EH
  • 3. [15B-145-EL] SamiULLAH INT 10H ;FOR CONTINUE MOV AH,09H MOV DX,OFFSET CONTINUE INT 21H MOV AH,01H INT 21H MOV CON,AL MOV AL,CON CMP AL,'Y' JE START CMP AL,'N' JE EXIT MUL: ; PERFORMING MULTIPLICATION MOV AH,09H MOV DX,OFFSET MUL1 INT 21H ;FIRST OPERAND MOV AH,09H MOV DX,OFFSET NUM1 INT 21H MOV AH,01H INT 21H SUB AL,30H MOV OP1,AL ;SECOND OPERAND MOV AH,09H MOV DX,OFFSET NUM2 INT 21H MOV AH,01H INT 21H SUB AL,30H MOV OP2,AL MOV AH,09H MOV DX, OFFSET ANS INT 21H MOV AL,OP1 MOV BL,OP2 MUL BL ADD AL,30H ; PRINT RESULT MOV AH,0EH INT 10H ;FOR CONTINUE MOV AH,09H MOV DX,OFFSET CONTINUE INT 21H MOV AH,01H INT 21H MOV CON,AL MOV AL,CON CMP AL,'Y' JE START CMP AL,'N' JE EXIT DIV: ; PERFORMING DIVISION MOV AH,09H MOV DX,OFFSET DIV1 INT 21H ;FIRST OPERAND
  • 4. [15B-145-EL] SamiULLAH MOV AH,09H MOV DX,OFFSET NUM1 INT 21H MOV AH,01H INT 21H SUB AL,30H MOV OP1,AL ;SECOND OPERAND MOV AH,09H MOV DX,OFFSET NUM2 INT 21H MOV AH,01H INT 21H SUB AL,30H MOV OP2,AL MOV AH,09H MOV DX, OFFSET ANS INT 21H MOV AX,0000H MOV AL,OP1 MOV BL,OP2 DIV BL ADD AL,30H ; PRINT RESULT MOV AH,0EH INT 10H ;FOR CONTINUE MOV AH,09H MOV DX,OFFSET CONTINUE INT 21H MOV AH,01H INT 21H MOV CON,AL MOV AL,CON CMP AL,'Y' JE START CMP AL,'N' JE EXIT EXIT: ; SAY GOOD BYE AND THEN EXIT MOV AH,09H MOV DX,OFFSET EX INT 21H .EXIT END