SlideShare a Scribd company logo
Add Two Arrays:
Write a MIPS assembly language program that adds two arrays with ten elements (element-by-
element addition) andsave them in an array. Print the sum. Please someone who can actually do
it and not copy and paste it from another site.
Solution
Ans.
DATA SEGMENT
NUM1 2,3,1,7.6,9,0,5,4,2
NUM2 0,9,6,3,8,1,8,9,6,1
RESULT
ENDS
START:
MOV AX,DATA
MOV DS,AX
LEA SI,NUM1
LEA DI,NUM2
LEA BX,RESULT
MOV CX,10
LOOP1:
MOV AL,[SI]
ADD AL,[DI]
MOV [BX],AL
INC BX
INC SI
INC DI
LOOP LOOP1

More Related Content

More from irshadkumar3

The _____ were Roman merchantsSolutionCorrect AnswerPlebeia.pdf
The _____ were Roman merchantsSolutionCorrect AnswerPlebeia.pdfThe _____ were Roman merchantsSolutionCorrect AnswerPlebeia.pdf
The _____ were Roman merchantsSolutionCorrect AnswerPlebeia.pdf
irshadkumar3
 
The functions f_1, f_2, ..., f_m defined on the interval I are said t.pdf
The functions f_1, f_2, ..., f_m defined on the interval I are said t.pdfThe functions f_1, f_2, ..., f_m defined on the interval I are said t.pdf
The functions f_1, f_2, ..., f_m defined on the interval I are said t.pdf
irshadkumar3
 
Silica gel is slightly acidic. Will this cause an acidic compound to.pdf
Silica gel is slightly acidic. Will this cause an acidic compound to.pdfSilica gel is slightly acidic. Will this cause an acidic compound to.pdf
Silica gel is slightly acidic. Will this cause an acidic compound to.pdf
irshadkumar3
 
Rank the four substances from least to most polar, Ethanol, pentanol.pdf
Rank the four substances from least to most polar, Ethanol, pentanol.pdfRank the four substances from least to most polar, Ethanol, pentanol.pdf
Rank the four substances from least to most polar, Ethanol, pentanol.pdf
irshadkumar3
 
Compare and contrast the main approaches for developing a WBS. Which.pdf
Compare and contrast the main approaches for developing a WBS. Which.pdfCompare and contrast the main approaches for developing a WBS. Which.pdf
Compare and contrast the main approaches for developing a WBS. Which.pdf
irshadkumar3
 
PROBLEM 4 Run runTerribleLoop for one hour. You can stop the prog.pdf
PROBLEM 4 Run runTerribleLoop for one hour. You can stop the prog.pdfPROBLEM 4 Run runTerribleLoop for one hour. You can stop the prog.pdf
PROBLEM 4 Run runTerribleLoop for one hour. You can stop the prog.pdf
irshadkumar3
 
please help! READ th.pdf
please help! READ th.pdfplease help! READ th.pdf
please help! READ th.pdf
irshadkumar3
 
In 1972 the small kingdom of Bhutan, in Asia, developed a measure of.pdf
In 1972 the small kingdom of Bhutan, in Asia, developed a measure of.pdfIn 1972 the small kingdom of Bhutan, in Asia, developed a measure of.pdf
In 1972 the small kingdom of Bhutan, in Asia, developed a measure of.pdf
irshadkumar3
 
Identify and explain, in order of occurrence, the four primary phase.pdf
Identify and explain, in order of occurrence, the four primary phase.pdfIdentify and explain, in order of occurrence, the four primary phase.pdf
Identify and explain, in order of occurrence, the four primary phase.pdf
irshadkumar3
 
IA 31 The reweycir deseers.ostains 4phaws G1,2, s, and M panes .pdf
IA 31 The reweycir deseers.ostains 4phaws G1,2, s, and M panes .pdfIA 31 The reweycir deseers.ostains 4phaws G1,2, s, and M panes .pdf
IA 31 The reweycir deseers.ostains 4phaws G1,2, s, and M panes .pdf
irshadkumar3
 
I am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdf
I am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdfI am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdf
I am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdf
irshadkumar3
 
How do you do the last page. How do you make the picture with the t.pdf
How do you do the last page. How do you make the picture with the t.pdfHow do you do the last page. How do you make the picture with the t.pdf
How do you do the last page. How do you make the picture with the t.pdf
irshadkumar3
 
How do auditors gain an understanding of the internal controls in an.pdf
How do auditors gain an understanding of the internal controls in an.pdfHow do auditors gain an understanding of the internal controls in an.pdf
How do auditors gain an understanding of the internal controls in an.pdf
irshadkumar3
 
Hello. Im currently working on the last section to my assignment a.pdf
Hello. Im currently working on the last section to my assignment a.pdfHello. Im currently working on the last section to my assignment a.pdf
Hello. Im currently working on the last section to my assignment a.pdf
irshadkumar3
 
CPIIs the CPI a true measure of inflationSolutionYes, the C.pdf
CPIIs the CPI a true measure of inflationSolutionYes, the C.pdfCPIIs the CPI a true measure of inflationSolutionYes, the C.pdf
CPIIs the CPI a true measure of inflationSolutionYes, the C.pdf
irshadkumar3
 
Exercise 10-1 Identifying financial versus managerial accounting ite.pdf
Exercise 10-1 Identifying financial versus managerial accounting ite.pdfExercise 10-1 Identifying financial versus managerial accounting ite.pdf
Exercise 10-1 Identifying financial versus managerial accounting ite.pdf
irshadkumar3
 
Both E_1 and E_2 are from problem 1. State at least one reason why b.pdf
Both E_1 and E_2 are from problem 1.  State at least one reason why b.pdfBoth E_1 and E_2 are from problem 1.  State at least one reason why b.pdf
Both E_1 and E_2 are from problem 1. State at least one reason why b.pdf
irshadkumar3
 
37. In the equilibrium represented above, the species that act as aci.pdf
37. In the equilibrium represented above, the species that act as aci.pdf37. In the equilibrium represented above, the species that act as aci.pdf
37. In the equilibrium represented above, the species that act as aci.pdf
irshadkumar3
 
A class of 50 music students includes 13 who play the piano, 14 who p.pdf
A class of 50 music students includes 13 who play the piano, 14 who p.pdfA class of 50 music students includes 13 who play the piano, 14 who p.pdf
A class of 50 music students includes 13 who play the piano, 14 who p.pdf
irshadkumar3
 
A poor country wants to increase exports to developed countries. Outl.pdf
A poor country wants to increase exports to developed countries. Outl.pdfA poor country wants to increase exports to developed countries. Outl.pdf
A poor country wants to increase exports to developed countries. Outl.pdf
irshadkumar3
 

More from irshadkumar3 (20)

The _____ were Roman merchantsSolutionCorrect AnswerPlebeia.pdf
The _____ were Roman merchantsSolutionCorrect AnswerPlebeia.pdfThe _____ were Roman merchantsSolutionCorrect AnswerPlebeia.pdf
The _____ were Roman merchantsSolutionCorrect AnswerPlebeia.pdf
 
The functions f_1, f_2, ..., f_m defined on the interval I are said t.pdf
The functions f_1, f_2, ..., f_m defined on the interval I are said t.pdfThe functions f_1, f_2, ..., f_m defined on the interval I are said t.pdf
The functions f_1, f_2, ..., f_m defined on the interval I are said t.pdf
 
Silica gel is slightly acidic. Will this cause an acidic compound to.pdf
Silica gel is slightly acidic. Will this cause an acidic compound to.pdfSilica gel is slightly acidic. Will this cause an acidic compound to.pdf
Silica gel is slightly acidic. Will this cause an acidic compound to.pdf
 
Rank the four substances from least to most polar, Ethanol, pentanol.pdf
Rank the four substances from least to most polar, Ethanol, pentanol.pdfRank the four substances from least to most polar, Ethanol, pentanol.pdf
Rank the four substances from least to most polar, Ethanol, pentanol.pdf
 
Compare and contrast the main approaches for developing a WBS. Which.pdf
Compare and contrast the main approaches for developing a WBS. Which.pdfCompare and contrast the main approaches for developing a WBS. Which.pdf
Compare and contrast the main approaches for developing a WBS. Which.pdf
 
PROBLEM 4 Run runTerribleLoop for one hour. You can stop the prog.pdf
PROBLEM 4 Run runTerribleLoop for one hour. You can stop the prog.pdfPROBLEM 4 Run runTerribleLoop for one hour. You can stop the prog.pdf
PROBLEM 4 Run runTerribleLoop for one hour. You can stop the prog.pdf
 
please help! READ th.pdf
please help! READ th.pdfplease help! READ th.pdf
please help! READ th.pdf
 
In 1972 the small kingdom of Bhutan, in Asia, developed a measure of.pdf
In 1972 the small kingdom of Bhutan, in Asia, developed a measure of.pdfIn 1972 the small kingdom of Bhutan, in Asia, developed a measure of.pdf
In 1972 the small kingdom of Bhutan, in Asia, developed a measure of.pdf
 
Identify and explain, in order of occurrence, the four primary phase.pdf
Identify and explain, in order of occurrence, the four primary phase.pdfIdentify and explain, in order of occurrence, the four primary phase.pdf
Identify and explain, in order of occurrence, the four primary phase.pdf
 
IA 31 The reweycir deseers.ostains 4phaws G1,2, s, and M panes .pdf
IA 31 The reweycir deseers.ostains 4phaws G1,2, s, and M panes .pdfIA 31 The reweycir deseers.ostains 4phaws G1,2, s, and M panes .pdf
IA 31 The reweycir deseers.ostains 4phaws G1,2, s, and M panes .pdf
 
I am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdf
I am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdfI am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdf
I am getting an errormsg 911, Level 16, State 1, Line 12 Database.pdf
 
How do you do the last page. How do you make the picture with the t.pdf
How do you do the last page. How do you make the picture with the t.pdfHow do you do the last page. How do you make the picture with the t.pdf
How do you do the last page. How do you make the picture with the t.pdf
 
How do auditors gain an understanding of the internal controls in an.pdf
How do auditors gain an understanding of the internal controls in an.pdfHow do auditors gain an understanding of the internal controls in an.pdf
How do auditors gain an understanding of the internal controls in an.pdf
 
Hello. Im currently working on the last section to my assignment a.pdf
Hello. Im currently working on the last section to my assignment a.pdfHello. Im currently working on the last section to my assignment a.pdf
Hello. Im currently working on the last section to my assignment a.pdf
 
CPIIs the CPI a true measure of inflationSolutionYes, the C.pdf
CPIIs the CPI a true measure of inflationSolutionYes, the C.pdfCPIIs the CPI a true measure of inflationSolutionYes, the C.pdf
CPIIs the CPI a true measure of inflationSolutionYes, the C.pdf
 
Exercise 10-1 Identifying financial versus managerial accounting ite.pdf
Exercise 10-1 Identifying financial versus managerial accounting ite.pdfExercise 10-1 Identifying financial versus managerial accounting ite.pdf
Exercise 10-1 Identifying financial versus managerial accounting ite.pdf
 
Both E_1 and E_2 are from problem 1. State at least one reason why b.pdf
Both E_1 and E_2 are from problem 1.  State at least one reason why b.pdfBoth E_1 and E_2 are from problem 1.  State at least one reason why b.pdf
Both E_1 and E_2 are from problem 1. State at least one reason why b.pdf
 
37. In the equilibrium represented above, the species that act as aci.pdf
37. In the equilibrium represented above, the species that act as aci.pdf37. In the equilibrium represented above, the species that act as aci.pdf
37. In the equilibrium represented above, the species that act as aci.pdf
 
A class of 50 music students includes 13 who play the piano, 14 who p.pdf
A class of 50 music students includes 13 who play the piano, 14 who p.pdfA class of 50 music students includes 13 who play the piano, 14 who p.pdf
A class of 50 music students includes 13 who play the piano, 14 who p.pdf
 
A poor country wants to increase exports to developed countries. Outl.pdf
A poor country wants to increase exports to developed countries. Outl.pdfA poor country wants to increase exports to developed countries. Outl.pdf
A poor country wants to increase exports to developed countries. Outl.pdf
 

Recently uploaded

Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
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
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
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
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
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
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
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
 
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
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
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
 

Recently uploaded (20)

Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
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
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
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
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.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
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
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...
 
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
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
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
 

Add Two ArraysWrite a MIPS assembly language program that adds tw.pdf

  • 1. Add Two Arrays: Write a MIPS assembly language program that adds two arrays with ten elements (element-by- element addition) andsave them in an array. Print the sum. Please someone who can actually do it and not copy and paste it from another site. Solution Ans. DATA SEGMENT NUM1 2,3,1,7.6,9,0,5,4,2 NUM2 0,9,6,3,8,1,8,9,6,1 RESULT ENDS START: MOV AX,DATA MOV DS,AX LEA SI,NUM1 LEA DI,NUM2 LEA BX,RESULT MOV CX,10 LOOP1: MOV AL,[SI] ADD AL,[DI] MOV [BX],AL INC BX INC SI INC DI LOOP LOOP1