SlideShare a Scribd company logo
Write a Pep/8 Assembly program that reads in and stores two integers from the user and prints
out their sum in the form: Total = Submit: Pep/8 formatted program in a text file
Solution
Answer:
Assembly Language Program :
.zero 1
.LC0:
.string "Enter two integers: "
.LC1:
.string "Total"
.LC2:
.string " = "
main:
push rbp
mov rbp, rsp
sub rsp, 16
mov esi, OFFSET FLAT:.LC0
mov edi, OFFSET FLAT:std::cout
call std::basic_ostream >& std::operator<< >(std::basic_ostream >&, char const*)
lea rax, [rbp-8]
mov rsi, rax
mov edi, OFFSET FLAT:std::cin
call std::basic_istream >::operator>>(int&)
mov rdx, rax
lea rax, [rbp-12]
mov rsi, rax
mov rdi, rdx
call std::basic_istream >::operator>>(int&)
mov edx, DWORD PTR [rbp-8]
mov eax, DWORD PTR [rbp-12]
add eax, edx
mov DWORD PTR [rbp-4], eax
mov esi, OFFSET FLAT:.LC1
mov edi, OFFSET FLAT:std::cout
call std::basic_ostream >& std::operator<< >(std::basic_ostream >&, char const*)
mov esi, OFFSET FLAT:.LC2
mov rdi, rax
call std::basic_ostream >& std::operator<< >(std::basic_ostream >&, char const*)
mov rdx, rax
mov eax, DWORD PTR [rbp-4]
mov esi, eax
mov rdi, rdx
call std::basic_ostream >::operator<<(int)
mov eax, 0
leave
ret
__static_initialization_and_destruction_0(int, int):
push rbp
mov rbp, rsp
sub rsp, 16
mov DWORD PTR [rbp-4], edi
mov DWORD PTR [rbp-8], esi
cmp DWORD PTR [rbp-4], 1
jne .L5
cmp DWORD PTR [rbp-8], 65535
jne .L5
mov edi, OFFSET FLAT:std::__ioinit
call std::ios_base::Init::Init()
mov edx, OFFSET FLAT:__dso_handle
mov esi, OFFSET FLAT:std::__ioinit
mov edi, OFFSET FLAT:std::ios_base::Init::~Init()
call __cxa_atexit
.L5:
nop
leave
ret
push rbp
mov rbp, rsp
mov esi, 65535
mov edi, 1
call __static_initialization_and_destruction_0(int, int)
pop rbp
ret

More Related Content

Similar to Write a Pep8 Assembly program that reads in and stores two integers .pdf

Assembler Programming
Assembler ProgrammingAssembler Programming
Assembler Programming
Omar Sanchez
 
Debugging TV Frame 0x13
Debugging TV Frame 0x13Debugging TV Frame 0x13
Debugging TV Frame 0x13
Dmitry Vostokov
 
Rcpp11
Rcpp11Rcpp11
Chapter3.ppt
Chapter3.pptChapter3.ppt
Chapter3.ppt
AshokRachapalli1
 
Write an MPI program that implements a shell-sort like parallel algo.pdf
Write an MPI program that implements a shell-sort like parallel algo.pdfWrite an MPI program that implements a shell-sort like parallel algo.pdf
Write an MPI program that implements a shell-sort like parallel algo.pdf
bharatchawla141
 
nand2tetris 舊版投影片 -- 第四章 機器語言
nand2tetris 舊版投影片 -- 第四章 機器語言nand2tetris 舊版投影片 -- 第四章 機器語言
nand2tetris 舊版投影片 -- 第四章 機器語言
鍾誠 陳鍾誠
 
Qemu JIT Code Generator and System Emulation
Qemu JIT Code Generator and System EmulationQemu JIT Code Generator and System Emulation
Qemu JIT Code Generator and System Emulation
National Cheng Kung University
 
eBPF Tooling and Debugging Infrastructure
eBPF Tooling and Debugging InfrastructureeBPF Tooling and Debugging Infrastructure
eBPF Tooling and Debugging Infrastructure
Netronome
 
Virtual Machine for Regular Expressions
Virtual Machine for Regular ExpressionsVirtual Machine for Regular Expressions
Virtual Machine for Regular Expressions
Alexander Yakushev
 
PHP applications/environments monitoring: APM & Pinba
PHP applications/environments monitoring: APM & PinbaPHP applications/environments monitoring: APM & Pinba
PHP applications/environments monitoring: APM & PinbaPatrick Allaert
 
Write a program in MIPS that reads in a Roman form number from th.pdf
Write a program in MIPS that reads in a Roman form number from th.pdfWrite a program in MIPS that reads in a Roman form number from th.pdf
Write a program in MIPS that reads in a Roman form number from th.pdf
santanadenisesarin13
 
Implementation - Sample Runs
Implementation - Sample RunsImplementation - Sample Runs
Implementation - Sample Runs
Adwiteeya Agrawal
 
ARM instruction set
ARM instruction  setARM instruction  set
ARM instruction set
Karthik Vivek
 
Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Romain Francois
 
Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06
Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06
Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06
ManhHoangVan
 
L10 assembly-language-programming-of-atmega328 p
L10 assembly-language-programming-of-atmega328 pL10 assembly-language-programming-of-atmega328 p
L10 assembly-language-programming-of-atmega328 p
rsamurti
 
C Programming ppt for beginners . Introduction
C Programming ppt for beginners . IntroductionC Programming ppt for beginners . Introduction
C Programming ppt for beginners . Introduction
raghukatagall2
 

Similar to Write a Pep8 Assembly program that reads in and stores two integers .pdf (20)

Assembler Programming
Assembler ProgrammingAssembler Programming
Assembler Programming
 
Debugging TV Frame 0x13
Debugging TV Frame 0x13Debugging TV Frame 0x13
Debugging TV Frame 0x13
 
Alp 05
Alp 05Alp 05
Alp 05
 
Rcpp11
Rcpp11Rcpp11
Rcpp11
 
Assembler
AssemblerAssembler
Assembler
 
Chapter3.ppt
Chapter3.pptChapter3.ppt
Chapter3.ppt
 
Write an MPI program that implements a shell-sort like parallel algo.pdf
Write an MPI program that implements a shell-sort like parallel algo.pdfWrite an MPI program that implements a shell-sort like parallel algo.pdf
Write an MPI program that implements a shell-sort like parallel algo.pdf
 
nand2tetris 舊版投影片 -- 第四章 機器語言
nand2tetris 舊版投影片 -- 第四章 機器語言nand2tetris 舊版投影片 -- 第四章 機器語言
nand2tetris 舊版投影片 -- 第四章 機器語言
 
Qemu JIT Code Generator and System Emulation
Qemu JIT Code Generator and System EmulationQemu JIT Code Generator and System Emulation
Qemu JIT Code Generator and System Emulation
 
eBPF Tooling and Debugging Infrastructure
eBPF Tooling and Debugging InfrastructureeBPF Tooling and Debugging Infrastructure
eBPF Tooling and Debugging Infrastructure
 
Virtual Machine for Regular Expressions
Virtual Machine for Regular ExpressionsVirtual Machine for Regular Expressions
Virtual Machine for Regular Expressions
 
PHP applications/environments monitoring: APM & Pinba
PHP applications/environments monitoring: APM & PinbaPHP applications/environments monitoring: APM & Pinba
PHP applications/environments monitoring: APM & Pinba
 
Write a program in MIPS that reads in a Roman form number from th.pdf
Write a program in MIPS that reads in a Roman form number from th.pdfWrite a program in MIPS that reads in a Roman form number from th.pdf
Write a program in MIPS that reads in a Roman form number from th.pdf
 
12 mt06ped008
12 mt06ped008 12 mt06ped008
12 mt06ped008
 
Implementation - Sample Runs
Implementation - Sample RunsImplementation - Sample Runs
Implementation - Sample Runs
 
ARM instruction set
ARM instruction  setARM instruction  set
ARM instruction set
 
Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Rcpp: Seemless R and C++
Rcpp: Seemless R and C++
 
Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06
Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06
Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06Lect-06
 
L10 assembly-language-programming-of-atmega328 p
L10 assembly-language-programming-of-atmega328 pL10 assembly-language-programming-of-atmega328 p
L10 assembly-language-programming-of-atmega328 p
 
C Programming ppt for beginners . Introduction
C Programming ppt for beginners . IntroductionC Programming ppt for beginners . Introduction
C Programming ppt for beginners . Introduction
 

More from rushabhshah600

Give an expression for the pattern inventory of 2-colorings of the ed.pdf
Give an expression for the pattern inventory of 2-colorings of the ed.pdfGive an expression for the pattern inventory of 2-colorings of the ed.pdf
Give an expression for the pattern inventory of 2-colorings of the ed.pdf
rushabhshah600
 
For the 4 arguments below, proceed as followsBREAK DOWN THE ARGU.pdf
For the 4 arguments below, proceed as followsBREAK DOWN THE ARGU.pdfFor the 4 arguments below, proceed as followsBREAK DOWN THE ARGU.pdf
For the 4 arguments below, proceed as followsBREAK DOWN THE ARGU.pdf
rushabhshah600
 
External respiration includes all of these processes EXCEPT _____. r.pdf
External respiration includes all of these processes EXCEPT _____.  r.pdfExternal respiration includes all of these processes EXCEPT _____.  r.pdf
External respiration includes all of these processes EXCEPT _____. r.pdf
rushabhshah600
 
art F You decide to cross the reciprocal translocation strain to a pu.pdf
art F You decide to cross the reciprocal translocation strain to a pu.pdfart F You decide to cross the reciprocal translocation strain to a pu.pdf
art F You decide to cross the reciprocal translocation strain to a pu.pdf
rushabhshah600
 
Ecosystem ecologyWhy are rain forests wet and deserts dry Compare.pdf
Ecosystem ecologyWhy are rain forests wet and deserts dry Compare.pdfEcosystem ecologyWhy are rain forests wet and deserts dry Compare.pdf
Ecosystem ecologyWhy are rain forests wet and deserts dry Compare.pdf
rushabhshah600
 
b) Analyze your network IP packets headers and contents.Solu.pdf
b) Analyze your network IP packets headers and contents.Solu.pdfb) Analyze your network IP packets headers and contents.Solu.pdf
b) Analyze your network IP packets headers and contents.Solu.pdf
rushabhshah600
 
A type A man is the son of a type O father and type A mother. If he .pdf
A type A man is the son of a type O father and type A mother. If he .pdfA type A man is the son of a type O father and type A mother. If he .pdf
A type A man is the son of a type O father and type A mother. If he .pdf
rushabhshah600
 
A One-Way Analysis of Variance is a way to test the equality of thre.pdf
A One-Way Analysis of Variance is a way to test the equality of thre.pdfA One-Way Analysis of Variance is a way to test the equality of thre.pdf
A One-Way Analysis of Variance is a way to test the equality of thre.pdf
rushabhshah600
 
5 000-0 SolutionEquity multiplier = Total Assets Equityor, .pdf
5 000-0 SolutionEquity multiplier = Total Assets  Equityor, .pdf5 000-0 SolutionEquity multiplier = Total Assets  Equityor, .pdf
5 000-0 SolutionEquity multiplier = Total Assets Equityor, .pdf
rushabhshah600
 
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
rushabhshah600
 
4 (4 points). How would you describe the difference in cell structur.pdf
4 (4 points). How would you describe the difference in cell structur.pdf4 (4 points). How would you describe the difference in cell structur.pdf
4 (4 points). How would you describe the difference in cell structur.pdf
rushabhshah600
 
Distinguish between cell fate and cell commitment. How can one assay.pdf
Distinguish between cell fate and cell commitment. How can one assay.pdfDistinguish between cell fate and cell commitment. How can one assay.pdf
Distinguish between cell fate and cell commitment. How can one assay.pdf
rushabhshah600
 
Differentiate the processes of oogenesis and spermatogenesis. Are th.pdf
Differentiate the processes of oogenesis and spermatogenesis. Are th.pdfDifferentiate the processes of oogenesis and spermatogenesis. Are th.pdf
Differentiate the processes of oogenesis and spermatogenesis. Are th.pdf
rushabhshah600
 
Define induction and give an example of deductive reasoningSolu.pdf
Define induction and give an example of deductive reasoningSolu.pdfDefine induction and give an example of deductive reasoningSolu.pdf
Define induction and give an example of deductive reasoningSolu.pdf
rushabhshah600
 
A report says that the between-subjects factor of participants sal.pdf
A report says that the between-subjects factor of participants sal.pdfA report says that the between-subjects factor of participants sal.pdf
A report says that the between-subjects factor of participants sal.pdf
rushabhshah600
 
City GUIWrite a Java GUI program which reads data about US cities..pdf
City GUIWrite a Java GUI program which reads data about US cities..pdfCity GUIWrite a Java GUI program which reads data about US cities..pdf
City GUIWrite a Java GUI program which reads data about US cities..pdf
rushabhshah600
 
What is the role of sulfur chemoautotrophs in the sulfur cycle Deco.pdf
What is the role of sulfur chemoautotrophs in the sulfur cycle  Deco.pdfWhat is the role of sulfur chemoautotrophs in the sulfur cycle  Deco.pdf
What is the role of sulfur chemoautotrophs in the sulfur cycle Deco.pdf
rushabhshah600
 
What is the PDU at Layer 4 calledA. DataB. SegmentC. Packet.pdf
What is the PDU at Layer 4 calledA. DataB. SegmentC. Packet.pdfWhat is the PDU at Layer 4 calledA. DataB. SegmentC. Packet.pdf
What is the PDU at Layer 4 calledA. DataB. SegmentC. Packet.pdf
rushabhshah600
 
Briefly describe the contributions to the quality movement made by e.pdf
Briefly describe the contributions to the quality movement made by e.pdfBriefly describe the contributions to the quality movement made by e.pdf
Briefly describe the contributions to the quality movement made by e.pdf
rushabhshah600
 
Background Angiosperms (flowering plants) are the largest Phylum in .pdf
Background  Angiosperms (flowering plants) are the largest Phylum in .pdfBackground  Angiosperms (flowering plants) are the largest Phylum in .pdf
Background Angiosperms (flowering plants) are the largest Phylum in .pdf
rushabhshah600
 

More from rushabhshah600 (20)

Give an expression for the pattern inventory of 2-colorings of the ed.pdf
Give an expression for the pattern inventory of 2-colorings of the ed.pdfGive an expression for the pattern inventory of 2-colorings of the ed.pdf
Give an expression for the pattern inventory of 2-colorings of the ed.pdf
 
For the 4 arguments below, proceed as followsBREAK DOWN THE ARGU.pdf
For the 4 arguments below, proceed as followsBREAK DOWN THE ARGU.pdfFor the 4 arguments below, proceed as followsBREAK DOWN THE ARGU.pdf
For the 4 arguments below, proceed as followsBREAK DOWN THE ARGU.pdf
 
External respiration includes all of these processes EXCEPT _____. r.pdf
External respiration includes all of these processes EXCEPT _____.  r.pdfExternal respiration includes all of these processes EXCEPT _____.  r.pdf
External respiration includes all of these processes EXCEPT _____. r.pdf
 
art F You decide to cross the reciprocal translocation strain to a pu.pdf
art F You decide to cross the reciprocal translocation strain to a pu.pdfart F You decide to cross the reciprocal translocation strain to a pu.pdf
art F You decide to cross the reciprocal translocation strain to a pu.pdf
 
Ecosystem ecologyWhy are rain forests wet and deserts dry Compare.pdf
Ecosystem ecologyWhy are rain forests wet and deserts dry Compare.pdfEcosystem ecologyWhy are rain forests wet and deserts dry Compare.pdf
Ecosystem ecologyWhy are rain forests wet and deserts dry Compare.pdf
 
b) Analyze your network IP packets headers and contents.Solu.pdf
b) Analyze your network IP packets headers and contents.Solu.pdfb) Analyze your network IP packets headers and contents.Solu.pdf
b) Analyze your network IP packets headers and contents.Solu.pdf
 
A type A man is the son of a type O father and type A mother. If he .pdf
A type A man is the son of a type O father and type A mother. If he .pdfA type A man is the son of a type O father and type A mother. If he .pdf
A type A man is the son of a type O father and type A mother. If he .pdf
 
A One-Way Analysis of Variance is a way to test the equality of thre.pdf
A One-Way Analysis of Variance is a way to test the equality of thre.pdfA One-Way Analysis of Variance is a way to test the equality of thre.pdf
A One-Way Analysis of Variance is a way to test the equality of thre.pdf
 
5 000-0 SolutionEquity multiplier = Total Assets Equityor, .pdf
5 000-0 SolutionEquity multiplier = Total Assets  Equityor, .pdf5 000-0 SolutionEquity multiplier = Total Assets  Equityor, .pdf
5 000-0 SolutionEquity multiplier = Total Assets Equityor, .pdf
 
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
 
4 (4 points). How would you describe the difference in cell structur.pdf
4 (4 points). How would you describe the difference in cell structur.pdf4 (4 points). How would you describe the difference in cell structur.pdf
4 (4 points). How would you describe the difference in cell structur.pdf
 
Distinguish between cell fate and cell commitment. How can one assay.pdf
Distinguish between cell fate and cell commitment. How can one assay.pdfDistinguish between cell fate and cell commitment. How can one assay.pdf
Distinguish between cell fate and cell commitment. How can one assay.pdf
 
Differentiate the processes of oogenesis and spermatogenesis. Are th.pdf
Differentiate the processes of oogenesis and spermatogenesis. Are th.pdfDifferentiate the processes of oogenesis and spermatogenesis. Are th.pdf
Differentiate the processes of oogenesis and spermatogenesis. Are th.pdf
 
Define induction and give an example of deductive reasoningSolu.pdf
Define induction and give an example of deductive reasoningSolu.pdfDefine induction and give an example of deductive reasoningSolu.pdf
Define induction and give an example of deductive reasoningSolu.pdf
 
A report says that the between-subjects factor of participants sal.pdf
A report says that the between-subjects factor of participants sal.pdfA report says that the between-subjects factor of participants sal.pdf
A report says that the between-subjects factor of participants sal.pdf
 
City GUIWrite a Java GUI program which reads data about US cities..pdf
City GUIWrite a Java GUI program which reads data about US cities..pdfCity GUIWrite a Java GUI program which reads data about US cities..pdf
City GUIWrite a Java GUI program which reads data about US cities..pdf
 
What is the role of sulfur chemoautotrophs in the sulfur cycle Deco.pdf
What is the role of sulfur chemoautotrophs in the sulfur cycle  Deco.pdfWhat is the role of sulfur chemoautotrophs in the sulfur cycle  Deco.pdf
What is the role of sulfur chemoautotrophs in the sulfur cycle Deco.pdf
 
What is the PDU at Layer 4 calledA. DataB. SegmentC. Packet.pdf
What is the PDU at Layer 4 calledA. DataB. SegmentC. Packet.pdfWhat is the PDU at Layer 4 calledA. DataB. SegmentC. Packet.pdf
What is the PDU at Layer 4 calledA. DataB. SegmentC. Packet.pdf
 
Briefly describe the contributions to the quality movement made by e.pdf
Briefly describe the contributions to the quality movement made by e.pdfBriefly describe the contributions to the quality movement made by e.pdf
Briefly describe the contributions to the quality movement made by e.pdf
 
Background Angiosperms (flowering plants) are the largest Phylum in .pdf
Background  Angiosperms (flowering plants) are the largest Phylum in .pdfBackground  Angiosperms (flowering plants) are the largest Phylum in .pdf
Background Angiosperms (flowering plants) are the largest Phylum in .pdf
 

Recently uploaded

Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 

Recently uploaded (20)

Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 

Write a Pep8 Assembly program that reads in and stores two integers .pdf

  • 1. Write a Pep/8 Assembly program that reads in and stores two integers from the user and prints out their sum in the form: Total = Submit: Pep/8 formatted program in a text file Solution Answer: Assembly Language Program : .zero 1 .LC0: .string "Enter two integers: " .LC1: .string "Total" .LC2: .string " = " main: push rbp mov rbp, rsp sub rsp, 16 mov esi, OFFSET FLAT:.LC0 mov edi, OFFSET FLAT:std::cout call std::basic_ostream >& std::operator<< >(std::basic_ostream >&, char const*) lea rax, [rbp-8] mov rsi, rax mov edi, OFFSET FLAT:std::cin call std::basic_istream >::operator>>(int&) mov rdx, rax lea rax, [rbp-12] mov rsi, rax mov rdi, rdx call std::basic_istream >::operator>>(int&) mov edx, DWORD PTR [rbp-8] mov eax, DWORD PTR [rbp-12] add eax, edx mov DWORD PTR [rbp-4], eax mov esi, OFFSET FLAT:.LC1 mov edi, OFFSET FLAT:std::cout
  • 2. call std::basic_ostream >& std::operator<< >(std::basic_ostream >&, char const*) mov esi, OFFSET FLAT:.LC2 mov rdi, rax call std::basic_ostream >& std::operator<< >(std::basic_ostream >&, char const*) mov rdx, rax mov eax, DWORD PTR [rbp-4] mov esi, eax mov rdi, rdx call std::basic_ostream >::operator<<(int) mov eax, 0 leave ret __static_initialization_and_destruction_0(int, int): push rbp mov rbp, rsp sub rsp, 16 mov DWORD PTR [rbp-4], edi mov DWORD PTR [rbp-8], esi cmp DWORD PTR [rbp-4], 1 jne .L5 cmp DWORD PTR [rbp-8], 65535 jne .L5 mov edi, OFFSET FLAT:std::__ioinit call std::ios_base::Init::Init() mov edx, OFFSET FLAT:__dso_handle mov esi, OFFSET FLAT:std::__ioinit mov edi, OFFSET FLAT:std::ios_base::Init::~Init() call __cxa_atexit .L5: nop leave ret push rbp mov rbp, rsp mov esi, 65535 mov edi, 1