SlideShare a Scribd company logo
1 of 1
Download to read offline
Write a small program in ARM to: Store these values into an array: 0, 2, 4, 6, 8, 10 (use loop,
don't manually put value in) Reverse this array by swapping values (I he array will then store
10, 8, 6, 4, 2, 0) Include the high-level programming language version in your answer as well.
Java/C++ code goes here:
Solution
A.
MOV R0, #0 ; R0 accumulates total
MOV R1, #1 ; R1 counts from 1 down to 10
again ADD R0, R0, R1
SUBS R1, R1, #10
BNE again
halt B halt

More Related Content

More from sales96

Philosophy questionExplain the principle known as Ockhams Razor..pdf
Philosophy questionExplain the principle known as Ockhams Razor..pdfPhilosophy questionExplain the principle known as Ockhams Razor..pdf
Philosophy questionExplain the principle known as Ockhams Razor..pdf
sales96
 
Explain, in your own words, the concept of cloud computing. Do you b.pdf
Explain, in your own words, the concept of cloud computing. Do you b.pdfExplain, in your own words, the concept of cloud computing. Do you b.pdf
Explain, in your own words, the concept of cloud computing. Do you b.pdf
sales96
 
Discuss why emerging diseases are appearing in industiralized countr.pdf
Discuss why emerging diseases are appearing in industiralized countr.pdfDiscuss why emerging diseases are appearing in industiralized countr.pdf
Discuss why emerging diseases are appearing in industiralized countr.pdf
sales96
 
2. Explain the use of cloud management for centralized control of a .pdf
2. Explain the use of cloud management for centralized control of a .pdf2. Explain the use of cloud management for centralized control of a .pdf
2. Explain the use of cloud management for centralized control of a .pdf
sales96
 

More from sales96 (20)

Select all the functions below that are the primary responsibilities .pdf
Select all the functions below that are the primary responsibilities .pdfSelect all the functions below that are the primary responsibilities .pdf
Select all the functions below that are the primary responsibilities .pdf
 
QUESTION 1 Prophage is a viral particle that cannot produce phages. O.pdf
QUESTION 1 Prophage is a viral particle that cannot produce phages. O.pdfQUESTION 1 Prophage is a viral particle that cannot produce phages. O.pdf
QUESTION 1 Prophage is a viral particle that cannot produce phages. O.pdf
 
Philosophy questionExplain the principle known as Ockhams Razor..pdf
Philosophy questionExplain the principle known as Ockhams Razor..pdfPhilosophy questionExplain the principle known as Ockhams Razor..pdf
Philosophy questionExplain the principle known as Ockhams Razor..pdf
 
Mycoplasma is a genus of bacteria that do not have a cell wall. Woul.pdf
Mycoplasma is a genus of bacteria that do not have a cell wall. Woul.pdfMycoplasma is a genus of bacteria that do not have a cell wall. Woul.pdf
Mycoplasma is a genus of bacteria that do not have a cell wall. Woul.pdf
 
LinguisticsExercise 1. For each pair of sentences X and Y below, s.pdf
LinguisticsExercise 1. For each pair of sentences X and Y below, s.pdfLinguisticsExercise 1. For each pair of sentences X and Y below, s.pdf
LinguisticsExercise 1. For each pair of sentences X and Y below, s.pdf
 
A department at a university plans to recruit a new faculty member. T.pdf
A department at a university plans to recruit a new faculty member. T.pdfA department at a university plans to recruit a new faculty member. T.pdf
A department at a university plans to recruit a new faculty member. T.pdf
 
Informal financial institutions and its system are important in serv.pdf
Informal financial institutions and its system are important in serv.pdfInformal financial institutions and its system are important in serv.pdf
Informal financial institutions and its system are important in serv.pdf
 
How to get pure culture from mixed sampleHow to get pure culture.pdf
How to get pure culture from mixed sampleHow to get pure culture.pdfHow to get pure culture from mixed sampleHow to get pure culture.pdf
How to get pure culture from mixed sampleHow to get pure culture.pdf
 
How does insulin binding activate the insulin receptor List the ste.pdf
How does insulin binding activate the insulin receptor List the ste.pdfHow does insulin binding activate the insulin receptor List the ste.pdf
How does insulin binding activate the insulin receptor List the ste.pdf
 
Given the tree what morphological characteristics do you expect to b.pdf
Given the tree what morphological characteristics do you expect to b.pdfGiven the tree what morphological characteristics do you expect to b.pdf
Given the tree what morphological characteristics do you expect to b.pdf
 
Explain, in your own words, the concept of cloud computing. Do you b.pdf
Explain, in your own words, the concept of cloud computing. Do you b.pdfExplain, in your own words, the concept of cloud computing. Do you b.pdf
Explain, in your own words, the concept of cloud computing. Do you b.pdf
 
Explain the intercellular junctions found on the lateral surface of .pdf
Explain the intercellular junctions found on the lateral surface of .pdfExplain the intercellular junctions found on the lateral surface of .pdf
Explain the intercellular junctions found on the lateral surface of .pdf
 
Explain how density, dispersion, and demographics, mortality, and su.pdf
Explain how density, dispersion, and demographics, mortality, and su.pdfExplain how density, dispersion, and demographics, mortality, and su.pdf
Explain how density, dispersion, and demographics, mortality, and su.pdf
 
Environmental engineering Q3 Discuss the formal classification of .pdf
Environmental engineering Q3 Discuss the formal classification of .pdfEnvironmental engineering Q3 Discuss the formal classification of .pdf
Environmental engineering Q3 Discuss the formal classification of .pdf
 
Discuss how bones are classified according to shape. Given at least o.pdf
Discuss how bones are classified according to shape. Given at least o.pdfDiscuss how bones are classified according to shape. Given at least o.pdf
Discuss how bones are classified according to shape. Given at least o.pdf
 
Due to similar selection pressure, several metatherians and eutheria.pdf
Due to similar selection pressure, several metatherians and eutheria.pdfDue to similar selection pressure, several metatherians and eutheria.pdf
Due to similar selection pressure, several metatherians and eutheria.pdf
 
Discus this topic..A nuclear reactor generates heat in the fuel ro.pdf
Discus this topic..A nuclear reactor generates heat in the fuel ro.pdfDiscus this topic..A nuclear reactor generates heat in the fuel ro.pdf
Discus this topic..A nuclear reactor generates heat in the fuel ro.pdf
 
Discuss why emerging diseases are appearing in industiralized countr.pdf
Discuss why emerging diseases are appearing in industiralized countr.pdfDiscuss why emerging diseases are appearing in industiralized countr.pdf
Discuss why emerging diseases are appearing in industiralized countr.pdf
 
Diastrophic dysplasia- Is an inherited autosomal recessive manner. D.pdf
Diastrophic dysplasia- Is an inherited autosomal recessive manner. D.pdfDiastrophic dysplasia- Is an inherited autosomal recessive manner. D.pdf
Diastrophic dysplasia- Is an inherited autosomal recessive manner. D.pdf
 
2. Explain the use of cloud management for centralized control of a .pdf
2. Explain the use of cloud management for centralized control of a .pdf2. Explain the use of cloud management for centralized control of a .pdf
2. Explain the use of cloud management for centralized control of a .pdf
 

Recently uploaded

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
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
QucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Recently uploaded (20)

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
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
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 

Write a small program in ARM to Store these values into an array 0.pdf

  • 1. Write a small program in ARM to: Store these values into an array: 0, 2, 4, 6, 8, 10 (use loop, don't manually put value in) Reverse this array by swapping values (I he array will then store 10, 8, 6, 4, 2, 0) Include the high-level programming language version in your answer as well. Java/C++ code goes here: Solution A. MOV R0, #0 ; R0 accumulates total MOV R1, #1 ; R1 counts from 1 down to 10 again ADD R0, R0, R1 SUBS R1, R1, #10 BNE again halt B halt