subject

Write an ARM Assembly program that will calculate the area of the following four plane shapes: a) Triangle b) Rectangle c) Trapezoid d) Square All number inputs are integers and all calculation results are provided in integer format. Any fractional calculations are to be truncated. The program must all meet the following requirements: 1. Each area calculation must be accessed as a subroutine/function (ARM instruction BL). 2. The operands are passed to the function via the stack. Use the ARM pseudo instructions PUSH and POP. To ensure you are properly implementing the stack the registers used in your main routine to hold the operands must be different than those used in the subroutines. For example, your calling routine will push r4 and r5 on the stack but the called routine will pop into registers r10 and ril. 3. The function returns the results on the top of the stack. 4. Your program is to print a welcome/instruction messages to the user. 5. The user is prompted to enter the calculation type and the appropriate number of positive integers. 6. The program shall verify the user input is valid and report any entry errors. Ensure your program checks for non-integer inputs (string, floating-point, characters). Invalid entries are reported and user prompted again to enter a valid input. 7. The program shall perform the calculation, display the results and report any overflow errors. Overflow is when the results do not fit into 32-bit unsigned format. 8. Ask the user if they want to continue with another calculation or quit the program.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:40
How do i get the most points, without any effort?
Answers: 2
question
Computers and Technology, 22.06.2019 20:00
What is the worst-case complexity of the maxrepeats function? assume that the longest string in the names array is at most 25 characters wide (i.e., string comparison can be treated as o( class namecounter { private: int* counts; int nc; string* names; int nn; public: namecounter (int ncounts, int nnames); int maxrepeats() const; }; int namecounter: : maxrepeats () { int maxcount = 0; for (int i = 0; i < nc; ++i) { int count = 1; for (int j = i+1; j < nc; ++j) { if (names[i] == names[j]) ++count; } maxcount = max(count, maxcount); } return maxcount; }
Answers: 3
question
Computers and Technology, 22.06.2019 21:30
Elements such as fonts colors visual structure graphics and the interface of a web page should complement each other to ensure blank
Answers: 3
question
Computers and Technology, 23.06.2019 03:50
Iam a bacterium. i cause stomach cramps and diarrhea. i am caused by eating rotten foodssuch as chicken, fish, or eggs. sometimes turtles carry my bacteria.what am i?
Answers: 2
You know the right answer?
Write an ARM Assembly program that will calculate the area of the following four plane shapes: a) Tr...
Questions
question
Mathematics, 27.01.2021 17:40
question
Mathematics, 27.01.2021 17:40
question
English, 27.01.2021 17:40
question
History, 27.01.2021 17:40
Questions on the website: 13722361