Short assembly program homework

Assignment Help Other Subject
Reference no: EM131081121

Short assembly program Homework .......

The task is to write an assembly program to search the data stored in the memory locations starting from 0x20001000 to 0x2000101C (total 8 data) for the smallest number and store it to the memory location 0x20002000. An equivalent C program would look like,

//This C program is only to demonstrate the flow of the homework.

int32_t            i, temp=0, data[8];       //temp is equivalent to R0 register.

for (i=7; i>=0; i--)       {if (temp>data[i]) temp=data[i];}       //compare and keep the smaller one.

1.     Assume that the data are stored in the memory at the beginning. Do not assign any specific values to them.  The program should be general enough to work with any data in the memory in any order.

2.     Note that a memory address increments by 4, not by 1.

3.     Use the for-loop style iteration to scan all memory data in the range.

4.     Use R0 to store the smallest number.

5.     Use R1 to count the number of iteration.

Deliverables

vCreate a .s file in uVision and build the target. Debug your program until you get 0 error.

vWrite the class and section number, your name and Homework number at the very top in comments.

vThen submit your .s file to BBlearner. You can change your submission up to 5 times.

vDue time is the midnight of February 28 (Sun).

Hint

Use the post-offset indirect addressing to fetch data in the memory.

baseaddr                      equ      0x20001000

index_increment          equ      4

            ldr       r2, =baseaddr

            ldr       r4, [r2], #index_increment      ;fetch the data and increment r2 address

            cmp     r0, r4               ;compare r0 and r4

            blt        move_on          ;if r0 is less than r4, move on. If not, replace 

            mov     r0, r4

move_on

            sub       r1, r1, #1                     ;decrement the counter by one.

End

Reference no: EM131081121

Questions Cloud

Question regarding the behavior of an accounting firm : Name the generic strategy you believe to most fit the behavior of an accounting firm (consult text and research for definition of terms). Explain your answer. Is this strategy choice effective? Why or why not?
Create a document explaining instructional methods : Create a document explaining instructional methods. In the document, you must include: brief explanations of each method and advantages and disadvantages of each method.
Determining the eigenvalues of the state matrix : determining the eigenvalues of the state matrix.
How will you build flexibility into your facility design : Identify issues to be considered when meeting the International Building Code for your selected facility. Describe measurements that may need to be done in advance of the new plan or renovation.
Short assembly program homework : The task is to write an assembly program to search the data stored in the memory locations starting from 0x20001000 to 0x2000101C (total 8 data) for the smallest number and store it to the memory location 0x20002000. An equivalent C program would..
Unemployment rates in the near future : What do economists expect will happen to unemployment rates in the near future? And Is the current level of unemployment a burden or an asset to the economy? In what ways?
Behavior of an accounting firm : Name the grand strategy you believe to most fit the behavior of an accounting firm (consult text and research for definition of terms). Explain your answer. Is this strategy choice effective? Why or why not?
Approach ethical dilemmas differently moving forward : Upload a clear and succinct two-page assessment/critique of the book. Make sure that the majority of your writing focuses on what you particularly learned from the book and how you will or will not approach ethical dilemmas differently moving forw..
Series and parallel inductive reactive circuits : Repeat the operations from Week 3 and Week 5 Labs.  Capture a screenshot of the output of the analysis to confirm your calculations in complex form.  Create a table of expected and measured results.

Reviews

Write a Review

Other Subject Questions & Answers

  Natural capitalism

In the book Natural Capitalism, Hawken et al, the authors talk about the fact that many natural resources are priceless because they are becoming scarce and have few, if any, substitutes. The authors continue by alleging that many companies are degra..

  Various stages of demographic transition

Demographic transition is the process in which a nation transitions from being a less industrialized society, with high birth and death rates, to an industrialized nation, with lower birth and death rates.

  Religion negative views of nature

Environmentally speaking, how might nature have been negatively viewed by some religions? What are some of the reasons nature is being viewed differently today? Thoughts?

  Explain the process that a budget must go through to gain

What steps are made in making the decision as to whether a budget will be approved or not?

  Determines human nature

The existentialists, such as Sartre, claim that if there is a human nature, it is formed by a homosapien as it lives its life and is done so by the selection it makes.

  Personality theory and work-satisfaction impact self-image

Understanding that we are much more than our job title is an important part of developing a healthy and sustainable self-image, and many of us find our self-image through our jobs.

  Educational paper- us adolescents physical activity level

Educational paper- Topic:(present situation of) U.S. Adolescents physical activity level. This is a part of an educational research paper

  Rising cost of health insurance premiums-longterm service

who pioneered the transformation of nursing into a recognized profession? under the hill-burton act, federal grants were given on the basis of. how are employers coping with the rising cost of health insurance premiums? which type of longterm care se..

  Write your paragraph on a sheet of 85 x 11 paper do not

a write your paragraph on a sheet of 8.5 x 11 paper. do not use a bluebook. your paper shouldnt be much smaller than

  Post-colonialism and tourism and sexuality and tourism

"You will have four research quizzes. For each quiz, you will locate a scholarly article over a topic that your instructor assigns. You will cite each article using the Chicago Manual of Style and provide a brief analysis of the article.

  What are the most effective leadership styles

What are the most effective leadership styles? Why are they effective? In your opinion, what are the least effective leadership styles? Explain.

  Determining cultural communications

Choose a movie that you have not previously seen from the following list: Mi Familia, My Big Fat Greek Wedding, I Am Sam, or Amistad. Watch the movie with this question in mind

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd