SlideShare ist ein Scribd-Unternehmen logo
1 von 2
Modify the code below to calculate the sum of squares of integer i from 1 to 100 using MIPS.
Display output.
Solution
.globl main
main: # sum of the integers from 1 to 100
.text
add $t0, $zero, $zero # I is zero
add $s0, $zero, $zero # sum is zero
addi $t1, $zero, 100 # set the limit value (100)
loop:
addi $t0, $t0, 1 # I = I + 1
mult $t0, $t0 # get I^2
mflo $t2 # store the product (i.e. the square) in $t2
add $s0, $s0, $t2Â Â Â Â Â Â # sum = sum + (I^2)
blt $t0, $t1, loop # I < 100 loop to do again
addi $v0, $zero, 4 # print string
la $a0, str # the text for output
syscall # call opsys
addi $v0, $zero, 1 # print integer
add $a0,$zero, $s0 # the integer is sum
syscall # call opsys
addi $v0, $zero, 10 # finished .. return
syscall # to the Operating System
.data
str:
.asciiz "The sum of squares from 1 ... 100 is "
Modify the code below to calculate the sum of squares of integer i fro.docx

Weitere ähnliche Inhalte

Ähnlich wie Modify the code below to calculate the sum of squares of integer i fro.docx

PCA-2 Programming and Solving 2nd Sem.pdf
PCA-2 Programming and Solving 2nd Sem.pdfPCA-2 Programming and Solving 2nd Sem.pdf
PCA-2 Programming and Solving 2nd Sem.pdfAshutoshprasad27
 
PCA-2 Programming and Solving 2nd Sem.docx
PCA-2 Programming and Solving 2nd Sem.docxPCA-2 Programming and Solving 2nd Sem.docx
PCA-2 Programming and Solving 2nd Sem.docxAshutoshprasad27
 
Write a MIPS assembler program that uses a function which calculates t.docx
Write a MIPS assembler program that uses a function which calculates t.docxWrite a MIPS assembler program that uses a function which calculates t.docx
Write a MIPS assembler program that uses a function which calculates t.docxlez31palka
 
Lec23-CS110 Computational Engineering
Lec23-CS110 Computational EngineeringLec23-CS110 Computational Engineering
Lec23-CS110 Computational EngineeringSri Harsha Pamu
 
Finish the program below that does several bit-wise manipulations of.pdf
Finish the program below that does several bit-wise manipulations of.pdfFinish the program below that does several bit-wise manipulations of.pdf
Finish the program below that does several bit-wise manipulations of.pdffasttrackcomputersol
 
Common problems solving using c
Common problems solving using cCommon problems solving using c
Common problems solving using cArghodeepPaul
 
B.Com 1year Lab programs
B.Com 1year Lab programsB.Com 1year Lab programs
B.Com 1year Lab programsPrasadu Peddi
 
32 shell-programming
32 shell-programming32 shell-programming
32 shell-programmingkayalkarnan
 
Computer programming subject notes. Quick easy notes for C Programming.Cheat ...
Computer programming subject notes. Quick easy notes for C Programming.Cheat ...Computer programming subject notes. Quick easy notes for C Programming.Cheat ...
Computer programming subject notes. Quick easy notes for C Programming.Cheat ...DR B.Surendiran .
 
CBSE Class 12 Computer practical Python Programs and MYSQL
CBSE Class 12 Computer practical Python Programs and MYSQL CBSE Class 12 Computer practical Python Programs and MYSQL
CBSE Class 12 Computer practical Python Programs and MYSQL Rishabh-Rawat
 
第二讲 Python基礎
第二讲 Python基礎第二讲 Python基礎
第二讲 Python基礎juzihua1102
 
第二讲 预备-Python基礎
第二讲 预备-Python基礎第二讲 预备-Python基礎
第二讲 预备-Python基礎anzhong70
 
C++ Tutorial.docx
C++ Tutorial.docxC++ Tutorial.docx
C++ Tutorial.docxPinkiVats1
 
ejemplos gambas
ejemplos gambasejemplos gambas
ejemplos gambaseduann
 

Ähnlich wie Modify the code below to calculate the sum of squares of integer i fro.docx (20)

Progr2
Progr2Progr2
Progr2
 
PCA-2 Programming and Solving 2nd Sem.pdf
PCA-2 Programming and Solving 2nd Sem.pdfPCA-2 Programming and Solving 2nd Sem.pdf
PCA-2 Programming and Solving 2nd Sem.pdf
 
PCA-2 Programming and Solving 2nd Sem.docx
PCA-2 Programming and Solving 2nd Sem.docxPCA-2 Programming and Solving 2nd Sem.docx
PCA-2 Programming and Solving 2nd Sem.docx
 
Write a MIPS assembler program that uses a function which calculates t.docx
Write a MIPS assembler program that uses a function which calculates t.docxWrite a MIPS assembler program that uses a function which calculates t.docx
Write a MIPS assembler program that uses a function which calculates t.docx
 
Lec23-CS110 Computational Engineering
Lec23-CS110 Computational EngineeringLec23-CS110 Computational Engineering
Lec23-CS110 Computational Engineering
 
Finish the program below that does several bit-wise manipulations of.pdf
Finish the program below that does several bit-wise manipulations of.pdfFinish the program below that does several bit-wise manipulations of.pdf
Finish the program below that does several bit-wise manipulations of.pdf
 
Common problems solving using c
Common problems solving using cCommon problems solving using c
Common problems solving using c
 
B.Com 1year Lab programs
B.Com 1year Lab programsB.Com 1year Lab programs
B.Com 1year Lab programs
 
32 shell-programming
32 shell-programming32 shell-programming
32 shell-programming
 
Computer programming subject notes. Quick easy notes for C Programming.Cheat ...
Computer programming subject notes. Quick easy notes for C Programming.Cheat ...Computer programming subject notes. Quick easy notes for C Programming.Cheat ...
Computer programming subject notes. Quick easy notes for C Programming.Cheat ...
 
CBSE Class 12 Computer practical Python Programs and MYSQL
CBSE Class 12 Computer practical Python Programs and MYSQL CBSE Class 12 Computer practical Python Programs and MYSQL
CBSE Class 12 Computer practical Python Programs and MYSQL
 
Twitter6
Twitter6Twitter6
Twitter6
 
Twitter6
Twitter6Twitter6
Twitter6
 
ECE-PYTHON.docx
ECE-PYTHON.docxECE-PYTHON.docx
ECE-PYTHON.docx
 
第二讲 Python基礎
第二讲 Python基礎第二讲 Python基礎
第二讲 Python基礎
 
第二讲 预备-Python基礎
第二讲 预备-Python基礎第二讲 预备-Python基礎
第二讲 预备-Python基礎
 
python.pdf
python.pdfpython.pdf
python.pdf
 
Hop ngu MIP
Hop ngu MIPHop ngu MIP
Hop ngu MIP
 
C++ Tutorial.docx
C++ Tutorial.docxC++ Tutorial.docx
C++ Tutorial.docx
 
ejemplos gambas
ejemplos gambasejemplos gambas
ejemplos gambas
 

Mehr von keshayoon3mu

(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx
(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx
(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docxkeshayoon3mu
 
(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx
(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx
(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docxkeshayoon3mu
 
(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx
(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx
(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docxkeshayoon3mu
 
(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx
(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx
(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docxkeshayoon3mu
 
(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx
(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx
(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docxkeshayoon3mu
 
(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx
(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx
(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docxkeshayoon3mu
 
(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx
(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx
(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docxkeshayoon3mu
 
(Click on the following icon in order to copy its contents into a spr.docx
(Click on the following icon  in order to copy its contents into a spr.docx(Click on the following icon  in order to copy its contents into a spr.docx
(Click on the following icon in order to copy its contents into a spr.docxkeshayoon3mu
 
(around 100 words summary) 20 Years of Investing Based on Academic Res.docx
(around 100 words summary) 20 Years of Investing Based on Academic Res.docx(around 100 words summary) 20 Years of Investing Based on Academic Res.docx
(around 100 words summary) 20 Years of Investing Based on Academic Res.docxkeshayoon3mu
 
(a) What is the mediat of variable x - The median of variable x is (Re.docx
(a) What is the mediat of variable x - The median of variable x is (Re.docx(a) What is the mediat of variable x - The median of variable x is (Re.docx
(a) What is the mediat of variable x - The median of variable x is (Re.docxkeshayoon3mu
 
(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx
(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx
(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docxkeshayoon3mu
 
(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx
(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx
(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docxkeshayoon3mu
 
(54)45(0-30)5(0-40)s4.docx
(54)45(0-30)5(0-40)s4.docx(54)45(0-30)5(0-40)s4.docx
(54)45(0-30)5(0-40)s4.docxkeshayoon3mu
 
(5 Points) If a variable is a pointer to a structure- then which of th.docx
(5 Points) If a variable is a pointer to a structure- then which of th.docx(5 Points) If a variable is a pointer to a structure- then which of th.docx
(5 Points) If a variable is a pointer to a structure- then which of th.docxkeshayoon3mu
 
(5 Points) If a variable is a pointer to a float- then which of the fo.docx
(5 Points) If a variable is a pointer to a float- then which of the fo.docx(5 Points) If a variable is a pointer to a float- then which of the fo.docx
(5 Points) If a variable is a pointer to a float- then which of the fo.docxkeshayoon3mu
 
(15pts) A-B tell the truth with probability p and lie with probability.docx
(15pts) A-B tell the truth with probability p and lie with probability.docx(15pts) A-B tell the truth with probability p and lie with probability.docx
(15pts) A-B tell the truth with probability p and lie with probability.docxkeshayoon3mu
 
(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx
(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx
(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docxkeshayoon3mu
 
(1) What is a budgetary slack- How to ensure the integrity of performa.docx
(1) What is a budgetary slack- How to ensure the integrity of performa.docx(1) What is a budgetary slack- How to ensure the integrity of performa.docx
(1) What is a budgetary slack- How to ensure the integrity of performa.docxkeshayoon3mu
 
(1) Describe the causative organism in staphylococcus a scalded skin s.docx
(1) Describe the causative organism in staphylococcus a scalded skin s.docx(1) Describe the causative organism in staphylococcus a scalded skin s.docx
(1) Describe the causative organism in staphylococcus a scalded skin s.docxkeshayoon3mu
 
(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx
(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx
(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docxkeshayoon3mu
 

Mehr von keshayoon3mu (20)

(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx
(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx
(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx
 
(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx
(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx
(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx
 
(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx
(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx
(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx
 
(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx
(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx
(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx
 
(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx
(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx
(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx
 
(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx
(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx
(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx
 
(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx
(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx
(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx
 
(Click on the following icon in order to copy its contents into a spr.docx
(Click on the following icon  in order to copy its contents into a spr.docx(Click on the following icon  in order to copy its contents into a spr.docx
(Click on the following icon in order to copy its contents into a spr.docx
 
(around 100 words summary) 20 Years of Investing Based on Academic Res.docx
(around 100 words summary) 20 Years of Investing Based on Academic Res.docx(around 100 words summary) 20 Years of Investing Based on Academic Res.docx
(around 100 words summary) 20 Years of Investing Based on Academic Res.docx
 
(a) What is the mediat of variable x - The median of variable x is (Re.docx
(a) What is the mediat of variable x - The median of variable x is (Re.docx(a) What is the mediat of variable x - The median of variable x is (Re.docx
(a) What is the mediat of variable x - The median of variable x is (Re.docx
 
(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx
(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx
(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx
 
(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx
(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx
(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx
 
(54)45(0-30)5(0-40)s4.docx
(54)45(0-30)5(0-40)s4.docx(54)45(0-30)5(0-40)s4.docx
(54)45(0-30)5(0-40)s4.docx
 
(5 Points) If a variable is a pointer to a structure- then which of th.docx
(5 Points) If a variable is a pointer to a structure- then which of th.docx(5 Points) If a variable is a pointer to a structure- then which of th.docx
(5 Points) If a variable is a pointer to a structure- then which of th.docx
 
(5 Points) If a variable is a pointer to a float- then which of the fo.docx
(5 Points) If a variable is a pointer to a float- then which of the fo.docx(5 Points) If a variable is a pointer to a float- then which of the fo.docx
(5 Points) If a variable is a pointer to a float- then which of the fo.docx
 
(15pts) A-B tell the truth with probability p and lie with probability.docx
(15pts) A-B tell the truth with probability p and lie with probability.docx(15pts) A-B tell the truth with probability p and lie with probability.docx
(15pts) A-B tell the truth with probability p and lie with probability.docx
 
(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx
(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx
(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx
 
(1) What is a budgetary slack- How to ensure the integrity of performa.docx
(1) What is a budgetary slack- How to ensure the integrity of performa.docx(1) What is a budgetary slack- How to ensure the integrity of performa.docx
(1) What is a budgetary slack- How to ensure the integrity of performa.docx
 
(1) Describe the causative organism in staphylococcus a scalded skin s.docx
(1) Describe the causative organism in staphylococcus a scalded skin s.docx(1) Describe the causative organism in staphylococcus a scalded skin s.docx
(1) Describe the causative organism in staphylococcus a scalded skin s.docx
 
(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx
(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx
(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx
 

Kürzlich hochgeladen

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 

Kürzlich hochgeladen (20)

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 

Modify the code below to calculate the sum of squares of integer i fro.docx

  • 1. Modify the code below to calculate the sum of squares of integer i from 1 to 100 using MIPS. Display output. Solution .globl main main: # sum of the integers from 1 to 100 .text add $t0, $zero, $zero # I is zero add $s0, $zero, $zero # sum is zero addi $t1, $zero, 100 # set the limit value (100) loop: addi $t0, $t0, 1 # I = I + 1 mult $t0, $t0 # get I^2 mflo $t2 # store the product (i.e. the square) in $t2 add $s0, $s0, $t2Â Â Â Â Â Â # sum = sum + (I^2) blt $t0, $t1, loop # I < 100 loop to do again addi $v0, $zero, 4 # print string la $a0, str # the text for output syscall # call opsys addi $v0, $zero, 1 # print integer add $a0,$zero, $s0 # the integer is sum syscall # call opsys addi $v0, $zero, 10 # finished .. return syscall # to the Operating System .data str: .asciiz "The sum of squares from 1 ... 100 is "